Error instalando Nodo de Cluster SQL Server 2008 R2

For English version visit this link Error installing Node of SQL Server 2008R2 Cluster
 
Esta semana, estamos migrando los servidores de Producción a SQL Server 2008 R2 SP1. Durante la instalación de un Nodo del Cluster SQL Server nos apareció el siguiente error:
 
 
Error reading from file:
X:\PATHFOLDER\x64\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template\master.mdf
Verify that the file exists and that you can access it.
 
Después de hacer diversas pruebas, nos dimos cuenta que no podiamos copiar ficheros .mdf, .ndf, .ldf y .bak al disco C:\, empezamos a mirar los permisos de los usuarios, políticas, permisos de ficheros y no lo conseguíamos, por lo que después de 3 horas decidimos dejarlo. A la mañana siguiente a un compañero se le ocurrió que podía ser por el antivirus, lo desactivamos y funcionó a la primera.
 
Esta es una muestra de como un pequeño fallo de cálculo imprevisto te puede hacer pasar un mal rato Una cosa si que es segura, de ahora en adelante ante el mas mínimo error extraño, lo primero que probaré es a desactivar el antivirus.
 
Advertisements

Error installing Node of SQL Server 2008R2 Cluster

For Spanish version visit this link Error instalando Nodo de Cluster SQL Server 2008 R2
 
This week, we are migrating the Production servers to SQL Server 2008 R2 SP1. During the installation of a Node of SQL Server Cluster, the following error occured:
 
 
Error reading from file: X:\PATHFOLDER\x64\setup\sql_engine_core_inst_msi\PFiles\SqlServr\MSSQL.X\MSSQL\Binn\Template\master.mdf
Verify that the file exists and that you can access it.
 
After doing several tests, we saw that we couldn’t copy files with .mdf, .ndf, .ldf and .bak extensions to C:\ drive, we start to check the users permissions, policies, file permissions and it not worked, so after 3 hours we decided to stop. The next day a co-worker said that could be the antivirus, we disabled it and the installation works like a charm.
 
This is an example of how an small unexpected failure calculation can make you to pass a hard time. One thing is sure, from now on at the minimum strange error, the first that I will probe is to disable the antivirus.
 

Resurrect SQL Server Agent after repair an instance

For Spanish version visit this link Resucitar Agente SQL Server después de reparar una instancia
 
After a failed update from SQL Server 2005 to SQL Server 2008 R2 SP1, I decided to use the Repair option of the installer, the SQL Server resource was repaired correctly, but the SQL Server Agent couldn’t start.
 
 
Read more of this post

Resucitar Agente SQL Server después de reparar una instancia

For English version visit this link Resurrect SQL Server Agent after repair an instance
 
Después de una actualización fallida desde SQL Server 2005 a SQL Server 2008 R2 SP1, decidí usar la opción de Repair del instalador de SQL Server, el recurso SQL Server se reparó correctamente, pero el de SQL Server Agent no conseguia iniciarlo.
 
 
Read more of this post

Script: Reduce Log File depending on DB Data Files size

For Spanish version visit this link Script: Reducir Log porcentualmente dependiendo del tamaño de los ficheros de Datos
 
A friend asked me about a dynamic script to reduce the DB Log File based on the total size of DB Data Files, here is the answer:
/*--------------------------------------------------------------------------------------
-- File: ShrinkToPercent.sql
-- Author: Fran Lens (http:\\www.lensql.net)
-- Date: 2012-03-27
-- Description: Reduce LogFile Size based on percentage of the Total Size of DataFiles
--------------------------------------------------------------------------------------*/
DECLARE @SelectDB varchar(50)
DECLARE @ShrinkPercent float
DECLARE @DBid int
DECLARE @RecoverySimple varchar(200)
DECLARE @RecoveryFull varchar(200)
DECLARE @ShrinkCommand nvarchar(200)
DECLARE @ShrinkFile varchar(50)
DECLARE @ShrinkValue varchar(50)

SET @SelectDB = 'AdventureWorks2008R2' -- Database whose Log will be Reduced
SET @ShrinkPercent = 30 -- Percentage of the DataFiles Size to Reduce the LogFile
						-- Example: With a value of 20 Percent and 1GB of Datafiles Size, the Log will be reduced to 200MB

SET @DbId= (select database_id from sys.databases where name=@SelectDB)
SET @RecoverySimple = 'ALTER DATABASE [' + @SelectDB + '] SET RECOVERY SIMPLE WITH NO_WAIT' -- Change the recovery model to Simple
SET @ShrinkFile = (SELECT name from sys.master_files WHERE database_id = @DBid and type_desc = 'LOG')
SET @ShrinkValue = (@ShrinkPercent)/100 * (SELECT SUM(size)/128 FROM sys.master_files WHERE database_id = @DBid and type_desc = 'ROWS')
SET @ShrinkCommand = 'USE [' + @SelectDB + ']' + CHAR(13)+ 'DBCC SHRINKFILE('+ @ShrinkFile+',' + @ShrinkValue + ')' -- Reduce the LogFile Size
SET @RecoveryFull = 'ALTER DATABASE [' + @SelectDB + '] SET RECOVERY FULL WITH NO_WAIT' -- Change the recovery model to Full

EXEC (@RecoverySimple)
EXEC sp_executesql @ShrinkCommand
EXEC (@RecoveryFull)

The merge process was unable to create a new generation at the ‘Publisher’

For Spanish version visit this link El proceso de mezcla no pudo crear una nueva generación en ‘Publisher’
 
Yesterday we did an massive update of 1 million of registers in a table of the replication DB, after the update , we started the replication of one computer, and we saw a failure in the first publication after 2000 seconds, showing the next error:
 
“The merge process was unable to create a new generation at the ‘Publisher’. Troubleshoot by restarting the synchronization with verbose history logging and specify an output file to which to write.”
 
Read more of this post

El proceso de mezcla no pudo crear una nueva generación en ‘Publisher’

For English version visit this link The merge process was unable to create a new generation at the ‘Publisher’
 
Ayer realizamos un update masivo de 1 millón de registros en una tabla de la BBDD de réplica, después del update, hicimos que un equipo replicara, y vimos que en la primera publicación fallaba después de unos 2000 segundos, dándonos el siguiente error:
 
“El proceso de mezcla no pudo crear una nueva generación en ‘Publisher’. Para solucionar el problema, reinicie la sincronización con registro de historial detallado y especifique un archivo de salida para escribir en él.” 
  Read more of this post