You are on page 1of 8

Move all databases to a different database server

This article contains information and steps for moving all the databases associated with Microsoft Office SharePoint Server 2007 from one database server to a new database server that has a different name. The following databases can be moved by using this procedure: Databases for Shared Services Providers (SSPs) Search databases for SSPs Content databases Search database Central Administration content database Configuration database

This article does not provide information about how to migrate or move the entire Office SharePoint Server 2007 farm. For more information about how to move the complete farm from one set of farm servers to another, see Move to another farm (http://go.microsoft.com/fwlink/?LinkId=141018). This article does not provide information about how to move only content databases. For more information about how to move only the content databases from one database server to another, see Move content databases (http://go.microsoft.com/fwlink/?LinkId=141019). This article does not provide information about how to move single sign-on (SSO) databases. If you are using SSO, you must move the SSO database separately. For more information, see Back up and restore SSO (http://go.microsoft.com/fwlink/?LinkId=141020). This article does not provide information about how to upgrade the database server. For more information about how to upgrade to Windows Server 2008, see Installing Windows Server 2008 (http://go.microsoft.com/fwlink/?LinkId=140803) or see the documentation included with the software. For more information about how to upgrade to Microsoft SQL Server 2008, see Installing SQL Server 2008 (http://go.microsoft.com/fwlink/?LinkId=141021) or see the documentation included with the software. Important: The following are the minimum required to perform this procedure:

You must be a member of the Farm Administrators SharePoint group.

On the computer that is running the SharePoint Central Administration Web site, you must be a member of the Administrators group.

On the database server from which the databases are being moved:

o o

You must be a member of the Administrators group. You must be a member of the db_backupoperator fixed database role.

On the database server to which the databases are being moved:

You must be a member of the Administrators group.

You must be a member of the db_owner fixed database role.

In some environments, you must coordinate the move procedures with the database administrator. Be sure to follow any applicable policies and guidelines for handling databases.

Move all databases to a different database server Important: This task requires you to stop the complete farm. This will make all farm sites and assets unavailable to users until the process is complete. 1. Prepare the new database server by using the Prepare the database servers (http://go.microsoft.com/fwlink/?LinkId=141023) procedure.

Record which Web applications are associated with the SSP by performing the following steps: a. On the SharePoint Central Administration Web site, on the Application Management page, in the Office SharePoint Server Shared Services section, click Create or configure this farms shared services.

Record the associated Web applications that are listed on the Manage This Farms Shared Services page. Back up an SSP by performing the following steps: a. On the drive on which SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin. If you do not already know what node you want to back up, type the following command: stsadm -o backup -showtree Note: Items enclosed by square brackets ([ ]) cannot be directly selected for backup but are backed up when their parent item is selected.

b.

To back up an SSP, type the following command: stsadm -o backup -directory <\\server name\folder name> -backupmethod full -item <SSP name> where \\server name\folder name is the UNC path of the backup folder and where SSP name is the name of

the SSP that you want to back up. All databases associated with the SSP will be automatically included in the backup. Repeat these steps for each SSP that you want to back up. Remove the SSP by performing the following steps: a. On the disk on which Microsoft SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft shared\Web server extensions\12\Bin. To remove an SSP, type the following command, and then press ENTER: stsadm -o deletessp -title <SSP name> -deletedatabases -force where SSP name is the name of the SSP that you want to remove. c. To detach the SSP content database from the SharePoint farm, type the following command and press ENTER: stsadm -o -deletecontentdb -url <URL> -databasename <database name> where URL is the URL of the SSP administration application from which the content database will be detached and database name is the name of the content database to be detached. d. Repeat steps b and c for each SSP.

b.

Delete the SSP content databases. a. b. c. d. Start SQL Server Management Studio and connect to the database server. In Object Explorer, expand Databases. Right-click an SSP content database, point to Tasks, and click Delete. On the Delete Object page, verify that the database you want to delete is selected, and then click OK. Perform steps c and d for each SSP content database.

e.

Stop the farm by performing the following steps: e. On the server that is running the Central Administration Web site, in the Services snap-in, stop the following services:

Microsoft Single Sign-On service Office Document Conversions Launcher service Office Document Conversions Load Balancer service Office SharePoint Server Search service Windows SharePoint Services Administration service Windows SharePoint Services Search service


f. g.

Windows SharePoint Services Timer service Windows SharePoint Services Tracing service Windows SharePoint Services VSS Writer service

At the command prompt, type iisreset /stop. Repeat step 6 on each server in the farm.

Back up the databases on the source database server. a. b. c. Start SQL Server Management Studio and connect to the database server. In Object Explorer, expand Databases. Right-click the configuration database (usually named SharePoint_Config), point to Tasks, and then click Back Up. In the Back Up Database dialog box, select the type of backup that you want to perform from the Backup type list. For more information about which backup type to use, see Overview of Recovery Models (http://go.microsoft.com/fwlink/?LinkId=114396&clcid=0x409). Click Database. In the Backup set area, in the Name text box, type a name or use the default. In the Description text box, type a description of the backup. Specify how long the backup should be kept, or use the default. When the backup set expires, the backup set can be overwritten by any subsequent backups with the same name. By default, the setting for the backup set is 0 days so that it never expires. In the Destination section, specify a location to store the backup set, or use the default. Click OK to back up the database. Repeat steps c through j for the remaining databases in the farm.

d.

e. f. g. h.

i. j. k.

In Windows Explorer, locate the database backup (.bak) files that you want to move, and then copy or move them to the destination server. Important: In some environments, this step must be performed by the database administrator. Move only the backup files to the destination database server. Do not move any databases or other files at this time. Restore databases on the destination database server. a. b. c. Start SQL Server Management Studio and connect to the database server. In Object Explorer, expand Databases. Right-click the database that you want to restore, point to Tasks, point to Restore, and click Database.

d.

In the Restore Database dialog box, specify the destination and the source, and select the backup set or sets that you want to restore. The default values for destination and source typically suit most recovery scenarios.

e. f.

In the Select a page pane, click Options. In the Restore options section, select only Overwrite the existing database. Unless your environment or policies require otherwise, do not select the other options in this section. In the Recovery state section: If you have included all the transaction logs that you must restore, select RESTORE WITH RECOVERY. If you must restore additional transaction logs, select RESTORE WITH NORECOVERY. The third option, RESTORE WITH STANDBY is not used in this scenario.

g.

h. i.

Click OK to complete the restore operation. Repeat steps c through h for each database that you are restoring.

Copy to the destination database server all the SQL Server logins, fixed server roles, fixed database roles, and permissions for the databases. For information about how to copy SQL Server roles and permissions to the destination database server, see Microsoft Help and Support article 246133, How to transfer logins and passwords between instances of SQL Server (http://go.microsoft.com/fwlink/?LinkId=114420&clcid=0x409). For troubleshooting information, see Microsoft Help and Support article 240872, How to resolve permission issues when you move a database between servers that are running SQL Server (http://go.microsoft.com/fwlink/? LinkId=123469&clcid=0x409). Important: In some environments, this step must be performed by the database administrator. Refer the farm to the new database server. Important: There are two different procedures for redirecting the farm to the new database server. When you use an unnamed instance of SQL Server, the stsadm -o renameserver operation can be used to change the name of the database server that a farm refers to. However, renameserver does not rename named instances of SQL Server. If you are using a named instance of SQL Server, you must create a SQL Server connection alias. A connection alias is an alternative name that you can use to make a connection to an instance of SQL Server. In the case of SharePoint Products and Technologies, you can create a SQL Server alias that is used by all servers (including the front-end Web servers and application servers) to connect to the instance of SQL Server. For more information about named instances, see Using Named Instances (http://go.microsoft.com/fwlink/?LinkId=144252).

Use the following procedure if you are using an unnamed instance of SQL Server:
a. On the disk on which SharePoint Products and Technologies is installed, change to the following directory: %COMMONPROGRAMFILES%\Microsoft Shared\Web server extensions\12\Bin.

b.

Type the following command, and then press ENTER: stsadm -o renameserver -oldservername <name of the source database server> -newservername <name of the destination database server> For more information, see Renameserver: Stsadm operation (Office SharePoint Server) (http://go.microsoft.com/fwlink/?LinkId=141025).

c.

Repeat steps a and b on all servers that connect to SQL Server.

Use the following procedure if you are using a named instance of SQL Server:
a. Start the SQL Server Native Client Network Utility (%SYSTEM%\cliconfg.exe).

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. Repeat steps a through f on all servers that connect to SQL Server. Start the new farm by performing the following steps: a. In the Services snap-in, start the following services:


b. c.

Microsoft Single Sign-On service Office Document Conversions Launcher service (optional) Office Document Conversions Load Balancer service (optional) Office SharePoint Server Search service 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 (optional)

At the command prompt, type iisreset /start. Repeat step 12 on each server in the farm.

Restore an SSP to the new location. a. To obtain the backup GUID for the specific backup that you want to restore, type the following command, and press ENTER: stsadm -o backuphistory -directory <UNC path> where UNC path is the path to the shared folder that contains the backup. b. To restore an SSP, type the following command, and then press ENTER: stsadm -o restore -directory <UNC path> -backupid <GUID from backuphistory> -restoremethod new -newdatabaseserver <SQL Server instance> where UNC path is the UNC path of the backup shared folder, GUID from backuphistory is the GUID for the specific backup package that you want to restore, and SQL Server instance is the name of the SQL Server instance where the SSP databases should be restored. c. Repeat step 13 for each SSP that you want to move.

Configure a restored SSP to be the default SSP: a. On the SharePoint Central Administration Web site, on the Application Management page, in the Office SharePoint Server Shared Services section, click Create or configure this farms shared services. On the Manage This Farms Shared Services page, click Change Default SSP.

b.

On the Change Default Shared Services Provider page, select the SSP that you restored from the SSP Name list, and then click OK.

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. This white paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. 2009 Microsoft Corporation. All rights reserved. Microsoft, SQL Server, Windows, and SharePoint are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

You might also like