Saturday, January 8, 2011

Renaming The Central Administration Database

Unless you perform a command-line installation, by default SharePoint Central Administration site uses database name with a Globally Unique Identifier (GUID), for example: SharePoint_AdminContent_<GUID>. If you like to rename the Central Administration Database, you can follow these steps but with extreme caution Winking smile:

  • Log on to your SQL Server with an account that has full access; ideally, you should use the same account that you used for your SharePoint installation.
  • Open the SQL Server Management Studio interface and locate the SQL Server instance that contains your Central Administration database, for example: SharePoint_AdminContent_<GUID>. Right-click the database name and choose the Rename command from the shortcut menu to enter edit mode. Then press Ctrl+C to copy the existing name of the database for later use.
  • Back up the existing SharePoint_AdminContent_<GUID> database by right-clicking the name of the database and then selecting the Tasks command.
  • When you have successfully backed up the database, restore the information from the backup that you just performed to a new database having a user-friendly database name such as CentralAdmin_Content_SharePointMalayaDB.
  • Open SharePoint Central Administration. Under Application Management, click Manage Content Databases.
    • Select the SharePoint Central Administration v4 Web application using the Web application drop-down list.
    • Click the old database name, SharePoint_AdminContent_<GUID>.
    • Use the Database status drop-down option to change the status from Ready to Offline.
    • Do not select the option to remove the content database.
    • Click OK.
  • Log on to the SharePoint server using the account that was used to provision the database. Usually this is the service user account that you configured SharePoint with when you provisioned the content databases during the installation of SharePoint 2010.
  • After opening the command prompt, perform the following steps.
    • Type cd C:\Program Files\Common Files\Microsoft Shared\Web server extensions\14\BIN\ to change the directory to the SharePoint 2010 root so you can run the STSADM commands.
    • Delete the original Central Administration database, the one with the GUID that you copied earlier, using the following command:

      stsadm -o deletecontentdb -url http://UrlOfYourCentralAdministration:portnumber –databasename SharePoint_AdminContent_<GUID> -databaseserver NamedInstanceOfYourSqlServer

    • Associate the newly created database with your Central Administration using the following STSADM command:

      stsadm -o addcontentdb -url http:// UrlOfYourCentralAdministration:portnumber -databasename SharePoint_AdminContent_SharePointMalayaDB -databaseserver NamedInstanceOfYourSqlServer

  • Return to SharePoint Central Administration. Under Application Management, click Manage Content Databases and refresh the page to verify that your Central Administration database reflects the new database name.
  • If you see a database with the SharePoint_AdminContent_SharePointMalayaDB name, you can then be sure that the original Central Administration database is backed up, and you can delete it from SQL Server.

CentralAdministrationDBRename

No comments: