Installing SharePoint using the GUI works really well and makes the install process pretty simple. Using the Command Prompt to perform the install on the other hand probably gives you a better sense for what is being done. It certainly gives you more control over the naming of things like databases and application pools. One in particular is the SharePoint Central Administration site collection's content database. By default it is named by concatenating "SharePoint_AdminContent_" with a newly generated GUID.
This Central Admin content database name may not be aesthetically pleasing, or DBAs may have different naming conventions or standards they will want this database to follow. All is not lost if you have used the setup wizard GUI and SharePoint has generated a database with a name like this. Content databases can be renamed by backing up and restoring the database with the new name, and then removing the old one from the web application and adding the new one in its place.
Unlike renaming regular web applications, it is best to remove the old content database and add the database restored with the new name using the Command Prompt. There is a Content Databases section in Central Administration, but in this case the content database is the same one on the backend that hosts Central Administration and that section.
Following are the steps I find work best for me when I need to rename the Central Administration content database:
- Stop the Central Administration application pool in IIS. This will prevent data loss and ensure no one else is performing operations while the content database is adjusted.
By default, the Central Administration application pool is called "SharePoint Central Administration v3" in IIS.
- Backup the Central Administration content database using SQL Server Management Studio. I backed up the database "SharePoint_AdminContent_b73dd91a-a0f2-4d8bad9f-ba4ab59a4de3" in this example.
- Restore the previously backed up Central Administration content database to a new database using a new name. I restored that database with the name "SharePoint_AdminContent" (without the GUID) in this example.
- Open a Command Prompt window under the context of the SharePoint server farm account. This is the same account used as the identity of the Central Administration application pool.
The easiest way is to right-click the Command Prompt in the start menu, then choose "Run As" and enter the service account's credentials.
- Enter the STSADM command in the Command Prompt window using the "deletecontentdb" option. For example, I entered the following STSADM command:
stsadm -o deletecontentdb -url http://Example:41000/ -databasename SharePoint_AdminContent_b73dd91a-a0f2-4d8bad9f-ba4ab59a4de3
- Enter another STSADM command using the "addcontentdb" option. For example, I entered the following STSADM command:
stsadm -o addcontentdb -url http://Example:41000/ -databasename SharePoint_AdminContent
- Delete the old content database. I deleted "SharePoint_AdminContent_b73dd91a-a0f2-4d8bad9f-ba4ab59a4de3" in this example.
- Restart the Central Administration application pool in IIS (SharePoint Central Administration v3).