Renaming Content Databases

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:

  1. On a Web front-end computer open a command prompt and change directories to %commonprogramfiles%Microsoft SharedWeb Server Extensions12BIN.
  2. Enter STSADM -o deletecontendb -url <http://<virtualServer&gt; -databasename <databaseName> -databaseserver <databaseServer> and press Enter to detach the content database (Windows SharePoint Services 3.0/Microsoft Office SharePoint Server 2007).  For additional information on the addcontentdb operation see http://technet.microsoft.com/en-us/library/cc287664(TechNet.10).aspx.

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)

  1. Connect to your database server and open SQL Server Management Studio.
  2. In Object Explorer connect to an instance of the SQL Server 2005 Database Engine, and then expand that instance.
  3. Set the database to single-user mode.  See http://msdn.microsoft.com/en-us/library/ms345598.aspx for instructions on how to set single-user mode using the SQL Server Management Studio.
  4. Expand the Databases node, right-click the database to rename, and then click Rename.
  5. Enter the new database name, and then click OK.

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:

  1. On a Web front-end computer open a command prompt and change directories to %commonprogramfiles%Microsoft SharedWeb Server Extensions12BIN.
  2. Enter STSADM -o addcontentdb -url <http://<virtualServer&gt; -databasename <databaseName> -databaseserver <databaseServer> and press Enter to attach the content database (Windows SharePoint Services 3.0/Microsoft Office SharePoint Server 2007).  When using a SQL login you supply the appropriate credentials using the -databaseuser and -databasepassword arguments.  To reconfigure the site warning and site maximum count for the content database, pass the -sitewarning and -sitemax arguments.  For additional information on the addcontentdb operation see http://technet.microsoft.com/en-us/library/cc288692(TechNet.10).aspx.

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.

Ensure all dependencies are updated to reference the new database name to include monitoring, backups, mirroring, etc.

Microsoft IT Site Delete Capture LE Version 1.0 Released

Microsoft IT Site Delete Capture LE version 1.0 has been released.


Microsoft Site Delete Capture LE version 1.0 is an Windows SharePoint Services 3.0 solution package that when deployed to a Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007 server farm enables administrators to create a snapshot of site collections and Webs when they are deleted through the SharePoint user interface, the SharePoint Administration Tool, or Microsoft Office SharePoint Designer 2007.

Microsoft IT Site Delete Capture LE 1.0 is a light-weight implementation of the Microsoft IT Site Delete Capture 1.0 offered as a Windows SharePoint Services 3.0 solution package. This build does not include e-mail notification logic and introduces deprecated application event logging.

Read more…

Add this to your image…

One of the most common configuration inconsistencies I find in SharePoint farms is the Web application path, in most scenarios the Web applications are provisioned under the default root path of C:InetpubwwwrootwssVirtualDirectories.  This is usually the result of oversight during the provisioning process. 


Windows SharePoint Services 3.0 provides a configuration field (see screenshot) that allows administrators to configure the path to the Web application host directory; however, in many cases, this setting is overlooked.  Unfortunately, once a Web application has been provisioned, the only reliable method of moving the Web application is to delete and recreate the Web application on the server farm.


image


Windows SharePoint Services 3.0 derives the directory information from the Web server registry setting at HKEY_LOCAL_MACHINESOFTWAREMicrosoftInetStpPathWWWRoot, this path is subsequently appended with wssVirtualDirectories.   To ensure Web applications are provisioned on the proper disk volume, modify the Registry values later in this post on your Web front-end computers to reference the desired path.  This can be modified either prior to or after Windows SharePoint Services 3.0/Microsoft Office SharePoint Server 2007 has been installed; however, any pre-existing Web applications will not reflect the path change (see above).


A Microsoft Internet Information Services best practice is to avoid using the default path (c:inetpubwwwroot) and moving Web content to a non-system directory.  By configuring the WWWRoot default path it provides a safeguard for oversight and promotes consistency across Web servers.


Configure the WWWRoot Default Path (Windows Server 2003)



  1. Click Start, and then select Run…

  2. In the Open field enter Regedit and click OK.

  3. Locate the HKEY_LOCAL_MACHINESOFTWAREMicrosoftInetStp key and modify the PathWWWRoot Value data to D:Inetpubvroots.

  4. Locate the HKEY_LOCAL_MACHINESYSTEMControlSet001ControlContentIndexCatalogsWeb key and modify the Location Value data to d:inetpub.

  5. Locate the HKEY_LOCAL_MACHINESYSTEMControlSet003ControlContentIndexCatalogsWeb key and modify the Location Value data to d:inetpub.

  6. Locate the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlContentIndexCatalogsWeb key and modify the Location Value data to d:inetpub.

  7. Repeat steps 1 through 3 on each Web front-end and application server.

Strikes by recommendation of Todd Carter.  Thanks! 


Some of the Registry keys in the steps above may not be available on all Web servers depending on configuration and Operating System versions.  Always backup the registry before modifying any Registry settings.

Watch SharePoint Grow!

I visited http://www.carbongrove.com on the commute home this evening and planted SharePoint.  Watch SharePoint grow at http://www.carbongrove.com/Trees/243029#g=0 or plant your own!


In partnership with a world leader in planting trees for environmental restoration, Windows Internet Explorer will sponsor the planting of up to 250,000 real trees in deforested regions around the globe.


Users simply need to visit their tree once a week and watch it grow.  After six weeks of your carbon reducing efforts, Windows Internet Explorer will sponsor the planting of a real tree.


For more information about Carbon Grove visit http://www.carbongrove.com/About.