Está en la página 1de 5

Pasos migración a SQL Server 2012 ó 2014:

MIGRACIÓN DE UNA BASE DE DATOS:

1. Backup/Restore de la base de dato desde SQL 2005 ó 2008 a 2012 ó 2014


2. Cambiar el nivel de compatibilidad:
exec sp_dbcmptlevel db_name, 110 (para 2014 se pone en 120)
3. Ejecutar DBCC CHECKDB con la opción DATA_PURITY
USE db_name
GO
DBCC CHECKDB WITH DATA_PURITY;
4. Ejecutar DBCC UPDATE_USAGE
DBCC UPDATEUSAGE(db_name);
5. Actualizar índices
EXEC sp_MSforeachtable @command1='ALTER INDEX ALL ON ? REBUILD';
Ó ejecute el siguiente bloque de instrucciones:

DECLARE @cmd varchar(255)


DECLARE @Table varchar(120)

USE db_name
DECLARE TableCursor CURSOR FOR
SELECT table_name as tableName FROM INFORMATION_SCHEMA.TABLES
WHERE table_type = 'BASE TABLE'

OPEN TableCursor
FETCH NEXT FROM TableCursor INTO @Table
WHILE @@FETCH_STATUS = 0
BEGIN
print @Table
SET @cmd = 'ALTER INDEX ALL ON ' + @Table + ' REBUILD'
EXEC (@cmd)
FETCH NEXT FROM TableCursor INTO @Table
END
CLOSE TableCursor
DEALLOCATE TableCursor

6. Actualizar estadísticas
USE db_name;
GO
EXEC sp_updatestats;
Ó
EXEC sp_MSforeachtable @command1='UPDATE STATISTICS ? WITH FULLSCAN';

7. Refrescar las vistas


--sp_refreshview
USE db_name;
GO
declare @strVista nvarchar(50)
declare cvistas CURSOR READ_ONLY FOR
select name from sys.objects where type ='V'

OPEN cvistas
FETCH cvistas INTO @strVista
WHILE @@fetch_status = 0
BEGIN
exec sp_refreshview @strVista
FETCH cvistas INTO @strVista
END
CLOSE cvistas
DEALLOCATE cvistas

MIGRACIÓN DE LOS REPORTES:

Desde Reporting Services 2005:

Los siguientes pasos son aplicados para migrar Reporting Services 2005 desde SQL Server 2005
sobre Windows 2003 hacia SQL Server 2012 sobre Windows Server 2012 en modo nativo:

1- Instale Reporting Services en el servidor con SQL Server 2012 pero no lo configure.
2- Realice backup del encryption Key en el servidor con SQL Server 2005 y cópielo al servidor
con SQL Server 2012.

o Reporting Services Configuration Tool


 start > all programs > microsoft sql server 2005 > configuration tools
> Reporting Services configuration manager
 In the left column, click on Encryption Keys
o Click on the Backup button in the right pane
o Set an easy to remember password and select a save location for all backup
files in the popup window – I prefer a folder on the c drive named
appropriately
o The task should complete without errors
3- Realice backup/restore de las bases de datos Reportserver y ReportServerTempdb desde
el servidor de SQL Server 2005 hacia el servidor con SQL Server 2012
4- Ejecute el proceso de migración para una base de datos definido al comienzo de este
documento.
5- Si los archivos de configuración en SQL Server 2005 tienen cambios especiales lleve una
copia al servidor con SQL Server 2012. Podría necesitar los siguientes archivos (sólo si
tienen cambios particulares):

6- Config Files
o Machine.config for ASP.NET (if modified for report server operations)
NOTE: .NET 3.0 and v3.5 are layered on top of 2.0, and use the 2.0
machine.config
 \Windows\Microsoft.Net\Framework\v2.0.xxx\config\
o Reportingservicesservice.exe.config
 <path>/ReportServer/bin/reportingservicesservice.exe.config
o Rsmgrpolicy.config
 <path>/ReportManager/rsmgrpolicy.config
o Rsreportserver.config NOTE: If not using Windows Integrated
Authentication, <AuthenticationTypes> node must be updated – supported
types are Kerberos, NTLM, Basic, Negotiate (digest, .net passport, and
anonymous are not supported from 2008 forward)
 <path>/ReportServer/rsreportserver.config
o Rssvrpolicy.config
 <path>/ReportServer/rssvrpolicy.config
o Rswebapplication.config (obsolete, all apps read rsreportserver.config – do
not need to migrate!)
o Web.config for Report Server
 <path>/ReportServer/web.config
o web.config for Report Manager ASP.NET
 <path>/ReportManager/web.config
o Custom CSS for reporting environment must be moved manually
7- Copie toda la información anterior en las carpetas correspondientes de SQL server 2012.
8- Inicie el servicio de Reporting Services
9- Configure el Reporting Services con el proceso normal para que apunte la base de datos
Reportserver restaurada de SQL Server 2005.
10- Restaure el Encryption Key que se copió desde SQL Server 2005
11- Vaya a la opción de Scale-out Deployment y borre la línea correspondiente a SQL Server
2005.
12- Si se presenta el siguiente error:
ERROR:
Microsoft.ReportingServices.WmiProvider.WMIProviderException: No
report servers were found. —>
System.Management.ManagementException: Invalid namespace
at
System.Management.ManagementException.ThrowWithExtendedInfo(Man
agementStatus errorCode)
at System.Management.ManagementScope.InitializeGuts(Object o)
at System.Management.ManagementScope.Initialize()
at System.Management.ManagementScope.Connect()
at ReportServicesConfigUI.WMIProvider.RSInstances.GetInstances(String
machineName)
— End of inner exception stack trace —
at ReportServicesConfigUI.WMIProvider.RSInstances.GetInstances(String
machineName)
at ReportServicesConfigUI.WMIProvider.RSInstances.GetInstance(String
machineName, String instanceName)
at
ReportServicesConfigUI.Panels.ClusterManagementPanel.ConfigureWebFa
rm(Object sender, RSReportServerInfo[] rsInfos)

Implemente la siguiente solución:


- Ingrese al SQL Server Management Studio
- Busque la tabla KEY en la base de datos ReportServer
- Elimine manualmente el registro relacionado con el servidor de SQL Server 2005
13- Reinicie los servicios de Reporting Services
14- Ingrese a la URL de Reporting Services: http://server/reports
15- Debe modificar todas las cadenas de conexión para que apunten al nuevo servidor
16- Revise que todos los usuarios y permisos estén configurados igual que en 2005.

Desde Reporting Services 2008 R2:

Utilice la siguiente herramienta desde el servidor con SQL Server 2008 R2 para migrar todos los
reportes a 2012:

Rs.exe is a command line utility included with SQL Server Reporting Services. This rss script
supports copying content such as reports and data sources from one report server to another. The
script supports both native mode report servers and SharePoint mode report servers. For example,
you can use the script to copy content from a native mode report server to a SharePoint mode
report server. Example:

rs.exe -i ssrs_migration.rss -e Mgmt2010 -s http://SourceServer/ReportServer -u Domain\User -p


password -v ts="http://TargetServer/reportserver" -v tu="Domain\Userser" -v tp="password"

Download the script from the CodePlex site Reporting Services RS.exe script migrates content to a local folder. See the section How
to use the ssrs_migration.rss script in this topic for more information.

1. Download the script file to a local folder, for example c:\rss\ssrs_migration.rss.


2. Open a command prompt with administrative privileges.
3. Navigate to the folder containing the ssrs_migration.rss file.
4. Run the command with the parameters appropriate for your scenario.

Usage notes:
 The script runs in two steps.
The first step is an audit, to return a list of items that will be migrated and the second step is the migration process.
You can cancel the script after step one if you only want to see the possible migration list or you want to modify the
parameters. Dependent settings are not listed in step one. For example, the cache options of a report are not listed but the
report itself is.

Para el caso de XM se usó el siguiente script:

rs.exe -i ssrs_migration.rss -e Mgmt2010 -s http://srvxmv040-cl/ReportServer -u ISAMDNT\


43700619 -p *** -v ts="http://comedxmv110/reportserver" -v tu="isamdnt\43700619" -v
tp="****" -t logMigracion

Después de ejecutar este script valide que los reportes hayan quedado cargados en SQL Server
2012
Debe ingresar a TODOS los datasources y reescribir la contraseña de todos los usuarios, esta
información no se migra

También debe configurar todos los usuarios que existan en el servidor de SQL Server 2005, esta
información tampoco es migrada.

 The SOURCE_URL and TARGET_URL must be valid report server URLs that point to the source and target Reporting
Services report server. In native mode, a report server URL looks like the following:
o http://servername/reportserver
In SharePoint mode the URL looks like the following:
o http://servername/_vti_bin/reportserver
 The virtual folder structure presented to the user in SharePoint might be different than the underlying one.
Openhttp://servername/_vti_bin/reportserver or http://servername/sites/site_name/_vti_bin/
reportserver in a browser to see the non-virtual folder structure. This is helpful for setting source folder and target
folder to something other than "/", for a server in SharePoint mode.
 Passwords are not migrated, and must be re-entered, for example data sources with stored credentials.

También podría gustarte