Moving the Service Manager Database
Updated: May 13, 2016
Applies To: System Center 2012 SP1 - Service Manager, System Center 2012 R2 Service Manager, System Center 2012 - Service Manager
You must use the following high-level steps to move the Service Manager database.
These steps link to content in the Service Manager Upgrade Guide.
Open the inbound SQL Port on new Service Manager database server. The default port is 1433.
Stop the System Center services on all the management servers, as described in How to Stop Service Manager Services on the Secondary Management Server.
Back up the Service Manager database, as described in How to Back Up the Production Service Manager Database.
Restore the Service Manager database on the target computer that is running Microsoft SQL Server, as described in How to Restore the Service Manager Database in the Lab Environment.
Configure the Service Manager database, as described in How to Prepare the Service Manager Database in the Lab Environment.
Do not perform step 17 in the procedure for configuring tables.
After you move the ServiceManager database, ensure that you manually change all the Service Manager database and data warehouse registration information in the DWStagingAndConfig database. Old information about where the ServiceManager database is located remains in the DWStagingAndConfig database in the following tables:
- In the corresponding entry with DataSourceName_GUID = <Service Manager Data Source Name>, change the field DatabaseServer_GUID with the new name of the SQLServer\Instance where the ServiceManager database has moved to.
- In the corresponding entry with DataService_GUID = ServiceManager, change the field Server_GUID to the new name of the SQLServer\Instance where the ServiceManager database has moved to.
Configure the registry on all the management servers that will access the new SQL Server instance, by using the following steps:
Open Registry Editor.
Browse to HKEY_LOCAL_MACHINE\Software\Microsoft\System Center\2010\Common\Database.
Configure two keys: one for the server name (DatabaseServerName) and one for the database name (DatabaseName). Set values to the new server name and database name, if they are different from the original values.
If you are also upgrading the SQL server while moving, then upgrade the following SQL Server prerequisites for the Service Manager Management server. There are 2 SQL Server prerequisites:
SQL Native Client
Analysis Management Objects (AMO)
Start the System Center services on all the management servers, as described in How to Start Service Manager Services on the Secondary Management Server.
Install another Service Manager database that has a different name on the same computer that is running SQL Server, by installing another Service Manager management server and choosing to create a new database. This step will populate the master database with error message text so that if an error occurs in the future, the error message can describe the specific problem instead of displaying generic text. After the database is installed, you can drop it from the computer that is running SQL Server and uninstall the additional, temporary management server.
Run the following query on the source Service Manager database server and copy the output script and then run it on new Service Manager database server.
DECLARE @crlf char(2); DECLARE @tab char(1); SET @crlf = CHAR(13) + CHAR(10); SET @tab = CHAR(9); SELECT 'EXEC sp_addmessage ' + @crlf + @tab + '@msgnum = ' + CAST(m.message_id AS varchar(30)) + ', ' + @crlf + @tab + '@severity = ' + CAST(m.severity AS varchar(3)) + ', ' + @crlf + @tab + '@msgtext = N''' + REPLACE(m.[text],'''','''''') + '''' + ', ' + @crlf + @tab + '@lang = ''' + (SELECT TOP 1 alias FROM master.sys.syslanguages l WHERE l.lcid = m.language_id) + ''', ' + @crlf + @tab + '@with_log = ''' + CASE WHEN m.is_event_logged = 1 THEN 'TRUE' ELSE 'FALSE' END + ''', ' + @crlf + @tab -- Uncomment ONLY if you want to replace: + '@replace = ''replace'';' + @crlf + 'GO' + @crlf + @crlf FROM master.sys.messages m WHERE m.message_id > 50000; GO