How to Prepare the Service Manager Database in the Lab Environment
Updated: May 13, 2016
Applies To: System Center 2012 - Service Manager, System Center 2012 R2 Service Manager
Use the following procedure to prepare the Service Manager (SM) 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.
To configure the database
On the computer hosting the Service Manager database for the secondary management server, click Start, click All Programs, click Microsoft SQL Server 2008 R2, and then click SQL Server Management Studio.
In the Connect to Server dialog box, 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 then click Connect.
In the Object Explorer pane, expand Databases, and then click ServiceManager.
In the toolbar, click New Query.
In the center pane, type the following commands, and then click Execute.
sp_configure 'clr enabled', 1 go reconfigure go
In the center pane, remove the commands you typed in the previous step, type the following commands, and then click Execute.
ALTER DATABASE ServiceManager SET SINGLE_USER WITH ROLLBACK IMMEDIATE
In the center pane, remove the commands you typed in the previous step, type the following commands, and then click Execute.
ALTER DATABASE ServiceManager SET ENABLE_BROKER
In the center pane, remove the commands you typed in the previous step, type the following commands, and then click Execute.
ALTER DATABASE ServiceManager SET MULTI_USER
To configure the service account
In the Object Explorer pane, expand Security, and then expand Logins.
Right-click Logins, and then click New Login
Perform the following procedures in the Login – New wizard:
Click Search.
Type the username (domain\username) for the service account for Service Manager database in the lab environment, click Check Names, and then click 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, click User Mapping.
In the Users mapped to this login area, in the Map column, click 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, make sure 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
Click Ok
To 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 then click 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, type the computer name of the computer hosting the Service Manager database in the lab environment. In the case of named instances, type computer name\instance name.
Right-click dbo. MT_Microsoft$SystemCenter$ResourceAccessLayer$SqlResourceStore, and then click Edit Top 200 Rows.
In the center pane, locate the column Server_48B308F9_CF0E_0F74_83E1_0AEB1B58E2FA.
In the first row of this column, type the computer name of the computer hosting the SQL Server for the Service Manager database in the lab environment. In the case of named instances, type computer name\instance name.
Right-click LFX.DataSource, and then click 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. Type 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 then click Edit Top 200 Rows.
In the center pane, locate the column Server_48B308F9_CF0E_0F74_83E1_0AEB1B58E2FA.
In all of the rows in this column, type the name of the computer hosting the Service Manager management server in the lab environment.
Right-click [dbo].[MT_Microsoft$SystemCenter$ResourceAccessLayer$CmdbResourceStore], and then click Edit Top 200 Rows.
In all rows update the column Server_48B308F9_CF0E_0F74_83E1_0AEB1B58E2FA, type the name of the SQL computer hosting the Service Manager database in the lab environment
In the toolbar, click New Query.
In the center pane, type the following command, and then click Execute.
Delete from dbo.MT_Microsoft$SystemCenter$ResourceAccessLayer$DwSdkResourceStore
Close Microsoft SQL Server Management Studio.