Friday, July 13, 2012

Migrating SharePoint Service DBs from One DB Server to Another


1.       Switch off the following SharePoint services on the Web Server :

·         Windows SharePoint Services Administration service
·         Windows SharePoint Services Search service
·         Windows SharePoint Services Timer service
·         Windows SharePoint Services Tracing service
·         Windows SharePoint Services VSS Writer service
This needs to be done so that no data is modified to the SharePoint site while the farm is being backed up and restored on the new server.

2.       Stop the Central Administration Web site on the Web Server.

3.       Create an Alias on the Web server from Source Server A to Target Server B. Alias can be created as follows:
Goto Start -> All Programs -> Microsoft SQL Server 2005 -> Configuration Tools -> SQL Server Configuration Manager. Click on SQL Native Client Configuration and create a new alias there with following details:
·         Alias Name = ‘Source Server A’
·         Protocol = TCP/IP
·         Server = ‘Source Server B’(Default Instance) or ‘Source Server B\Instance Name’(For Named Instance)

Alternately, the alias can also be created using the cliconfg.exe utility present in the systems folder as follows:

·         On the General tab, verify that TCP/IP is enabled.
·         On the Alias tab, click Add. The Add Network Library Configuration dialog box appears.
·         In the Server alias box, enter the name of the current instance of SQL Server.
·         In the Network libraries area, click TCP/IP.
·         In the Connection parameters area, in the Server name box, enter the new server name and instance to associate with the alias, and then click OK.

4.       Backup the SharePoint DBs on the Source Server A. I had the following DBs on my system to migrate it:
·         SharePoint_AdminContent_11a1a11a-111a-1111-aaaa-a1aa111a1111
·         SharePoint_Config
·         WSS_Content (Contents DB)
·         WSS_Search
Take full backups as well as the transactional log backups.
5.       Restore all the Full and Transactional log backups on the target server B.
6.       Copy all the required logins from Source Server A to Target Server B. Script to perform this can be found in the following link:
7.       Restart the Services and Website on the Web Server that was stopped in step 1 and 2.

No comments: