I received an inquiry this morning on what procedural steps are required to rename a Windows SharePoint Services 3.0 content database and decided to make the information more broadly available.
Step 1 Detach Content Database
Detach the Windows SharePoint Services 3.0 content database from its associated Web application in either Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007 using the steps as outlined below:
NOTE Content databases optionally can be detached from their associated Web application using the SharePoint 3.0 Central Administration interface. For additional information on managing and removing content databases using the SharePoint 3.0 Central Administration user interface see http://technet.microsoft.com/en-us/library/cc262440(TechNet.10).aspx#section3. In Microsoft Office SharePoint Server 2007 you should run the STSADM preparetomove operation prior to detaching content databases. This prevents the synchronization service from failing and losing user privacy settings for those sites after the sites are moved.
Step 2 Rename Content Database
Rename the content database (Microsoft SQL Server 2005 instructions)
NOTE Renaming databases using SQL Server Management Studio will only rename the database, to rename the data and transaction log files you must use Transact-SQL following the steps as documented in the SQL Server 2005 Books Online at http://msdn.microsoft.com/en-us/library/ms174269.aspx. Any time a database is renamed you should consider backing up the master database.
Step 3 Attach Content Database
After the database has been renamed on the database server, reattach the content database to its associated Web application be following the steps below:
NOTE Content databases optionally can be attached to their associated Web application using the SharePoint 3.0 Central Administration interface. For additional information on managing and adding content databases using the SharePoint 3.0 Central Administration user interface see http://technet.microsoft.com/en-us/library/cc262440(TechNet.10).aspx#section1.
Bill,
Great resource. Thanks for sharing!
I've used a different method to perform the same and wondered if you had thoughts on the disadvantages compared to your method. Prior to your step 1, I perform a stsadm -o backup. Instead of step 2 and after your step 3, I perform a stsadm -o restore.
Tom
The backup method is a viable option as well; however, typically more costly in execution time since you have to wait for the backup to be completed as well as the necessary restore operation.
I received an inquiry this morning on what procedural steps are required to rename a Windows SharePoint