Saturday, September 8, 2012

How to Move databases for SCCM 2012


How to Move databases for SCCM 2012

1.       On SCCM Site Server
a.       Stop site server using  (Configuration Manager site installation folder)\bin\X64\00000409\preinst.exe /STOPSITE
2.       On Reporting Server
a.       Backup the encryption key using Reporting Services Config tool
b.      Stop the Report Server service using the Reporting Services Config tool
3.       On Wsus server
a.       Stop IIS Admin Service
b.      Stop Update Services Service
4.       On SQL Server for WSUS DB
a.       Detach SUSDB – single user rollback immediate
b.      Move both files (mdf and ldf)
c.       Attach SUSDB to new SQL server
d.      Verify Wsus server machine account  has login permissions and is member of webService Role
5.       On SQL Server for Reporting Services DB
a.       Detach SCCM_ReportServer
b.      Detach SCCM_ReportServerTempDB
c.       Move all 4 files (2 mdf and 2 ldf)
d.      Attach both databases
e.      Verify that RSExecRole is a database role on both SCCM_ReportServer and SCCM_ReportServerTempDB.
                                                               i.      If not, create role per http://msdn.microsoft.com/en-us/library/cc281308.aspx
6.       On SQL Server for SCCM DB
a.       Detach CM_(Site Code)
b.      Move both files (mdf and ldf)
c.       Attach CM_(Site Code) to new SQL Server run the following stored procedure as a query: sp_configure ‘clr enabled’,1; reconfigure.
d.      Enable common language runtime (CLR) integration
e.      Verify SCCM Site servers are Local Administrators on the SQL server
f.        Add the site server system account as login account with admin rights to SQL
7.       On Wsus server
a.       Edit Backend Database registry key to point to new name/instance
                                                               i.      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\UpdateServices\Server\Setup\SqlServerName. In the Value text box, type [BEName]\[InstanceName], and then click OK. If the instance name is the default instance, type [BEName].
                                                             ii.      HKEY_LOCAL_MACHINE\Software\Microsoft\Update Services\Server\Setup\wYukonInstalled. In the Value text box, type 0, and then click OK. This indicates that Windows Internal Database is not used.
                                                            iii.      Locate the following key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\UpdateServices\Server\Setup\SqlInstanceIsRemote. In the Value text box, change the value to 1, and then click OK.
b.      Start IIS Admin Service
c.       Start Update Services Service
8.       On Report Server
a.       Open Reporting Services Config tool
b.      On Database page, select the new SQL server instance and click connect.
c.       Select the report server database and click apply
d.      On encryption key page click restore
e.      Setup the execution account
f.        Restart Report Server
9.       On SCCM Server
a.       Run Configuration Manager Setup Wizard using Setup.exe from  (Configuration Manager site installation folder)\BIN\X64\setup.exe.  Not from install media- you won't have the same options.
b.      Choose site maintenance or reset site
c.       Select Modify SQL Server configuration
d.      After wizard finishes restart SCCM site server
e.      In SCCM console update the properties of the Reporting Services Point role to use the SCCM Databse on the new server.  Administration>Servers and Site System Roles>Pick the server with the Reporting Services  Point Role>Pick Reporting services point>Right click and choose properties>Change Site Database Server name.