Set up a lab environment for upgrade testing
Use the following procedures to prepare for Service Manager upgrade by creating a lab environment and preparing it for production data for the purpose of upgrade testing.
Many of the procedures in this article are lengthy and might take a considerable amount of time to complete. As long as you complete the procedures in order, you don't need to complete them without stopping.
Restore the Service Manager database in the lab environment
Use the following procedure to restore the production Service Manager database using Microsoft SQL Server 2016 or later.
- After connecting to the appropriate instance of the Microsoft SQL Server Database Engine, in Object Explorer, select the server name to expand the server tree.
- Expand Databases, and depending on the database, either select a user database or expand System Databases, and select a system database.
- Right-click the database, point to Tasks, and select Restore. The Back Up Database dialog appears.
- Select Database, which opens the Restore Database dialog.
- On the General page, the name of the restoring database appears in the To database list box. To create a new database, enter its name in the list box.
- In the To a point in time text box, either retain the default (Most recent possible) or select a specific date and time by selecting the browse button, which opens the Point in Time Restore dialog. For more information, see How to: Restore to a Point in Time (SQL Server Management Studio).
- To specify the source and location of the backup sets to restore, select either From database or From device.
- In the Select the backup sets to restore grid, select the backups to restore. For more information, see Restore Database (General Page).
- To view or select the advanced options, select Options in the Select a page pane.
- In the Restore options panel, choose one of the following options most appropriate for your situation:
Overwrite the existing database
Preserve the replication settings
Prompt before restoring each backup
Restrict access to the restored database
For more information, see Restore Database (Options Page)
- Optionally, you can restore the database to a new location by specifying a new restore destination for each file in Restore the database files as. For more information, see Restore Database (Options Page).
- In the Recovery state panel, select one of the following options most appropriate for your environment:
Leave the database ready to use by rolling back the uncommitted transactions. Additional transaction logs cannot be restored. (RESTORE WITH RECOVERY)
Note
Choose this option only if you're restoring all the necessary backups at this time.
Leave the database non-operational, and do not roll back the uncommitted transactions. Additional transaction logs can be restored. (RESTORE WITH NORECOVERY)
Leave the database in read-only mode. Undo uncommitted transactions, but save the undo actions in a standby file so that recovery effects can be reverted. (RESTORE WITH STANDBY)
For more information, see Restore Database (Options Page).
Prepare the Service Manager database in the lab environment
Use the following procedure to prepare the Service Manager database in the lab environment. Perform this procedure on the computer that is hosting the Service Manager database that is being used by the secondary management server, the management server in your lab environment.
Configure the database
On the computer hosting the Service Manager database for the secondary management server, select Start, select All Programs, select Microsoft SQL Server 2016, and select SQL Server Management Studio.
In the Connect to Server dialog, follow these steps:
- In the Server Type list, select Database Engine.
- In the Server Name list, select the server name for your Service Manager or data warehouse databases.
- In the Authentication list, select Windows Authentication, and select Connect.
In the Object Explorer pane, expand Databases, and select ServiceManager.
In the toolbar, select New Query.
In the center pane, enter the following commands, and select Execute.
sp_configure 'clr enabled', 1 go reconfigure go
In the center pane, remove the commands you entered in the previous step, enter the following commands, and select Execute.
ALTER DATABASE ServiceManager SET SINGLE_USER WITH ROLLBACK IMMEDIATE
In the center pane, remove the commands you entered in the previous step, enter the following commands, and select Execute.
ALTER DATABASE ServiceManager SET ENABLE_BROKER
In the center pane, remove the commands you entered in the previous step, enter the following commands, and select Execute.
ALTER DATABASE ServiceManager SET MULTI_USER
Configure the service account
- In the Object Explorer pane, expand Security, and then expand Logins.
- Right-click Logins, and select New Login
- Perform the following procedures in the Login - New wizard:
Select Search.
Enter the username (domain\username) for the service account for Service Manager database in the lab environment, select Check Names, and select OK.
Note
If the Data Access Account is running as LocalSystem, use the format <domain\computername$> in SQL Logins, where <computername> is the name of the management server.
In the Select a page pane, select User Mapping.
In the Users mapped to this login area, in the Map column, select the row that represents the name of the Service Manager database (ServiceManager is the default database name).
In the Database role membership for: ServiceManager area, ensure that the following entries are selected:
- configsvc_users
- db_accessadmin
- db_datareader
- db_datawriter
- db_ddladmin
- db_securityadmin
- dbmodule_users
- public
- sdk_users
- sql_dependency_subscriber
Select Ok
Configure Service Manager tables
In the Object Explorer pane, expand Databases, expand ServiceManager, and then expand Tables.
Right-click dbo.MT_Microsoft$SystemCenter$ManagementGroup, and select Edit Top 200 Rows.
In the center pane, locate the column SQLServerName_43FB076F_7970_4C86_6DCA_8BD541F45E3A.
In the first row and second rows of this column, enter the computer name of the computer hosting the Service Manager database in the lab environment. For named instances, enter computer name\instance name.
Right-click dbo. MT_Microsoft$SystemCenter$ResourceAccessLayer$SqlResourceStore, and select Edit Top 200 Rows.
In the center pane, locate the column Server_43FB076F_7970_4C86_6DCA_8BD541F45E3A.
In the first row of this column, enter the computer name of the computer hosting the SQL Server for the Service Manager database in the lab environment. For named instances, enter computer name\instance name.
Right-click LFX.DataSource, and select Edit Top 200 Rows.
In the center pane, locate the column DataSourceAddress.
In the first row of this column, locate the entry that starts with Data Source = <server name>; Initial Catalog = ServiceManager; Persist Security Info=False. Enter the name of the computer hosting SQL Server in the lab environment in place of <server name>.
Right-click dbo. MT_Microsoft$SystemCenter$ResourceAccessLayer$SdkResourceStore, and select Edit Top 200 Rows.
In the center pane, locate the column Server_48B308F9_CF0E_0F74_83E1_0AEB1B58E2FA.
In all the rows in this column, enter the name of the computer hosting the Service Manager management server in the lab environment.
Right-click [dbo].[MT_Microsoft$SystemCenter$ResourceAccessLayer$CmdbResourceStore], and select Edit Top 200 Rows.
In all the rows, update the column Server_48B308F9_CF0E_0F74_83E1_0AEB1B58E2FA, enter the name of the SQL computer hosting the Service Manager database in the lab environment
In the toolbar, select New Query.
In the center pane, enter the following command, and select Execute.
Delete from dbo.MT_Microsoft$SystemCenter$ResourceAccessLayer$DwSdkResourceStore
Close Microsoft SQL Server Management Studio.
Configure the lab Service Manager management server
Using Registry Editor, expand the following path and update DatabaseServerName :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\System Center\2010\Common\Database
Edit the registry on the Service Manager Management Server in the lab environment
Use the following procedure to edit the registry on the Service Manager management server in the lab environment.
Caution
Incorrectly editing the registry might severely damage your system; therefore, before making changes to the registry, back up any valued data on the computer.
Edit the registry
- On the computer hosting the Service Manager management server in the lab environment, sign in to the computer as a user with administrative credentials.
- On the Windows desktop, select Start, and select Run.
- In the Run dialog, in the Open box, enter regedit, and select OK.
- In the Registry Editor window, expand HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\System Center\2012\Common\Database.
- In the right pane, double-click DatabaseServerName.
- In the Edit String box, in the Value data box, enter the name of the computer hosting the Service Manager database SQL Server in the lab environment. If you're using a named instance of SQL Server, use the Computer Name\Instance name format.
- Select OK, and then close the Registry Editor.
Start Service Manager services on the secondary management server
Use the following procedure to start the Service Manager services.
Start Service Manager services
- On the Windows desktop, select Start, and select Run.
- In the Run dialog, in the Open field, enter services.msc, and select OK.
- In the Services window, in the Services (Local) pane, locate the following three services and for each one, and select Start:
- System Center Data Access Service
- System Center Management
- System Center Management Configuration
Promote a secondary management server in a lab environment
Use the following procedure to promote the secondary management server.
- On the secondary management server, do the following:
- Close the Service Manager console.
- On the Windows desktop, select Start, and select Run.
- In the Run dialog, in the Open text field, enter services.msc, and select OK.
- In the Services window, in the Services (Local) pane, locate the following three services and for each one, and select Stop:
- System Center Data Access Service
- System Center Management
- System Center Management Configuration
- Leave the Services window open.
- Open Windows Explorer. Locate the \Program Files\Microsoft System Center\Service Manager folder.
- In this folder, delete the Health Service State folder and all of its contents.
- Do the following on the ServiceManager database on the Test SQL Server instance:
- On the Windows desktop, select Start, point to Programs, point to Microsoft SQL Server 2016, and select SQL Server Management Studio.
- In the Connect to Database Engine dialog, follow these steps:
- In the Server name box, enter the name of the server that hosts the ServiceManager database.
- In the Authentication box, select Windows Authentication.
- Select Connect.
- In the Object Explorer pane, expand Databases, and select ServiceManager.
- On the toolbar, select New Query.
- In the SQLQuery1.sql pane (center pane), enter the following, where <FQDN of your server> is the FQDN of the management server that you're promoting:
EXEC p_PromoteActiveWorkflowServer '<FQDN of your server>'
On the toolbar, select Execute. - At the bottom of the SQLQuery1.sql pane (center pane), observe that Query executed successfully is displayed.
- Exit Microsoft SQL Server Management Studio.
- Do the following on the secondary management server:
- On the Windows desktop, select Start, and select Run.
- In the Run dialog, in the Open field, enter services.msc, and select OK.
- In the Services window, in the Services (Local) pane, locate the following three services and for each one, select Start.
- System Center Data Access Service
- System Center Management
- System Center Management Configuration
Your secondary management server is now the primary management server for the management group.
Enable the connectors in the lab environment
Use the following procedure to enable the Service Manager connectors in the lab environment. In this procedure, you won't be enabling the Operations Manager connector.
Warning
Don't enable or delete the Operations Manager alert connector in the lab environment. Doing so will cause the alert connector in the production environment to fail.
Enable a connector
- In the Service Manager console, select Administration.
- In the Administration pane, expand Administration, and select Connectors.
- In the Connectors pane, select the connector that you want to enable.
- In the Tasks pane, under the connector name, select Enable.
Install a new data warehouse server in the lab environment
Use the following procedure to install a new data warehouse server in the lab environment.
Install a data warehouse management server and data warehouse databases
Sign in to the computer by using an account that has administrative rights.
On the Service Manager installation media, double-click the Setup.exe file.
On the Microsoft System Center Service Manager 2016 page, select Install a Service Manager data warehouse management server.
On the Product registration page, enter information in the boxes. In the Product key boxes, enter the product key you received with Service Manager, or alternatively, select Install as an evaluation edition (180 day trial)?. Read the Microsoft Software License Terms, and, if applicable, select I have read, understood, and agree with the terms of the license agreement, and select Next.
On the Installation location page, verify that sufficient free disk space is available, and select Next. If necessary, select Browse to change the location in which the Service Manager data warehouse management server will be installed.
On the System check results page, ensure that prerequisites passed or at least passed with warnings, and select Next.
On the Configure data warehouse databases page, Service Manager checks the computer you're using to see if it can host the data warehouse databases. For this configuration, confirm that the database server is the computer on which you're installing the data warehouse management server, and then select Next.
Warning
A warning message appears if you're using the default collation (SQL_Latin1_General_CP1_CI_AS). Support for multiple languages in Service Manager isn't possible when you're using the default collation. If later you decide to support multiple languages using a different collation, you've to reinstall SQL Server.
On the Configure the data warehouse management group page, follow these steps:
In the Management group name box, enter a unique name for the group.
Warning
Management group names must be unique. Don't use the same management group name when you deploy a Service Manager management server and a Service Manager data warehouse management server. Furthermore, don't use the management group name that is used for Operations Manager.
Select Browse, enter the user account or group to which you want to give Service Manager administrative rights, and select Next.
Service Manager will use the existing computer if SQL Server Reporting Services is present. On the Configure the reporting server for the data warehouse page, accept the defaults, and select Next.
On the Configure the account for Service Manager services page, select Domain account, specify the user name, password, and domain for the account, and select Test Credentials. After you receive a The credentials were accepted message, select Next.
On the Configure the reporting account page, specify the user name, password, and domain for the account, and select Test Credentials. After you receive a The credentials were accepted message, select Next.
On the Diagnostic and usage data page, indicate your preference for sharing your Service Manager diagnostic and usage data with Microsoft. As an option, select Privacy statement for System Center Service Manager, and select Next.
On the Use Microsoft Update to help keep your computer secure and up-to-date page, indicate your preference for using Microsoft Update to check for Service Manager updates, and select Next.
On the Installation summary page, select Install.
Validate a data warehouse management server installation
- On the computer hosting the data warehouse management server (the server you ran Setup on), run services.msc, and verify that the following services have been installed:
- System Center Data Access Service
- System Center Management
- System Center Management configuration
- On the computer hosting the data warehouse databases, select Start, point to Programs, point to Microsoft SQL Server, and select SQL Server Management Studio.
- In the Connect to Server dialog, select the following:
- In the Server Type list, select Database Engine.
- In the Server Name list, select the server and instance for your Service Manager data warehouse database. For example, select Computer 4.
- In the Authentication list, select Windows Authentication, and select Connect.
- In the Object Explorer pane, expand Databases.
- Verify that the DWDataMart, DWRepository, and DWStagingAndConfig databases are listed.
Register the data warehouse server in the lab environment
Use the following procedure to register the newly installed data warehouse server with the lab Service Manager environment.
Register a data warehouse
Sign in to the computer that hosts the Service Manager console. Use an account that is a member of the Service Manager and data warehouse management administrators group.
In the Service Manager console, select Administration.
In the Administration pane, expand Administration.
In the Administration view, in the Register with Service Manager's Data Warehouse area, select Register with Service Manager Data Warehouse.
In the Data Warehouse Registration wizard, on the Before You Begin page, select Next.
On the Data Warehouse page, in the Server name box, enter the fully qualified domain name of the computer hosting the data warehouse management server, and select Test Connection. If the test is successful, select Next.
On the Credentials page, you can accept the default entry in the Run as account list, and select Next, or you can enter credentials from a user or group of your own choosing.
Important
The account you specify will be assigned administrative credentials on the Service Manager management server and granted Read permission on the Service Manager database. You can specify different credentials from other Service Manager management groups when registering with the data warehouse.
On the Summary page, select Create.
On the Completion page, when The data warehouse registration succeeded is displayed, select Close.
A dialog states that the report deployment process hasn't finished. This is to be expected. On the System Center Service Manager dialog, select OK.
In a few minutes, after closing the Data Warehouse Registration wizard, the Data Warehouse button will be added to the Service Manager console. In the Service Manager console, select the arrow at the lower right corner of the Service Manager console buttons, and select Show More Buttons.
You can use a Windows PowerShell command to complete this task. For information about how to use Windows PowerShell to register Service Manager management groups with the data warehouse, see Add-SCDWMgmtGroup.
Validate the registration
On the computer hosting the data warehouse management server, start Windows PowerShell with administrative credentials.
At the Windows PowerShell command prompt, enter the following commands, and then press ENTER:
Set-ExecutionPolicy RemoteSigned Import-Module .\Microsoft.EnterpriseManagement.Warehouse.Cmdlets.psd1
Enter the following command, and then press ENTER.
Get-SCDWMgmtGroup
If the registration is successful, a table with two rows of data is displayed. One row displays data for the data warehouse management group, and a second row displays data for the Service Manager management group. If the registration fails, only the data for the data warehouse management group is displayed.
Determine when the deployment is complete
Because you need to allow enough time for the management pack deployment process to be completed, you'll have to determine when that process is complete. You can use the following procedure in Service Manager to determine when the process is complete.
Determine when management pack deployment has completed
Start the Service Manager console.
In the Service Manager console, select Data Warehouse.
In the Data Warehouse pane, expand Data Warehouse, and select Data Warehouse Jobs.
In the Data Warehouse Jobs pane, select MPSyncJob.
In the Tasks pane, under Synchronization, select Details.
In the MP Sync Job dialog, scroll to the right and examine the Status column.
Note
In the MP Sync Job dialog, select Status to alphabetically sort the status column.
Scroll through the Status list. The management pack deployment process is complete when Associated or Imported is listed in the status column for all of the management packs. Ensure that there's no status of either Pending Association or Failed in the status list. In the Data Warehouse Jobs pane, the status of the MPSyncJob will have changed from Running to Not Started. This deployment process can take up to two hours to complete.
To refresh the MP Sync Job dialog:
- Press OK to close the dialog.
- In the Tasks pane, in the Data Warehouse Jobs area, select Refresh.
- In the Data Warehouse Jobs pane, select MPSyncJobs.
- In the Tasks pane, under Synchronization, select Details.
After the management packs have been deployed (as determined in step 7), ensure that the following five data warehouse jobs are displayed in the Data Warehouse Jobs pane:
- Extract_<Service Manager management group name>
- Extract_<data warehouse management group name>
- Load.Common
- Transform.Common
- MPSyncJob
If these five data warehouse jobs aren't displayed, perform the following procedure:
- In the Data Warehouse Jobs pane, select MPSyncJob.
- In the Tasks pane, under Synchronization, select Resume.
- Assess if management pack deployment has completed by returning to step 4 above.