2. Renaming the Central Administration Database
After the SharePoint
configuration database, the Central Administration database is the
second most important database that SharePoint uses, and unless you
perform a command-line installation, it uses the default user name with
Unique Identifier (GUID). This can make it challenging if you want to
write scripts that reference the database using the default name. The
following steps should be used with extreme caution, but if you follow
them exactly, you can give the default Central Administration database
a more user-friendly name.
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
the SQL Server Management Studio interface and locate the SQL Server
instance that contains your Central Administration database. The
database name will be something similar to SharePoint_AdminContent_<GUID>, as shown in Figure 6.
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. Click anywhere outside of
the database name to exit edit mode.
Be sure not to change the name at this point—it will be done at a later time.
Figure 6. Finding the default Central Administration database name
While still in SQL Server Management Studio, back up the existing SharePoint_AdminContent_<GUID>
database by right-clicking the name of the database and then selecting
the Tasks command. Select Back Up to open the Back Up Database dialog
box. Use all of the default settings for the backup and then click OK.
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_DB. Perform
the restore by right-clicking the existing database name again and
selecting the Tasks command from the shortcut menu. Select Restore and
then Database to open the Restore Database dialog box shown in Figure 7. In the To Database section, type in the new database name and then click OK at the bottom of the dialog box.
Figure 7. Restoring to a new database name
Open 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.
It is critical that you use the correct user name during this step or you will probably receive Access Denied error messages.
on to the 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 (be sure to specify the
UrlOfYourCentralAdministration and NamedInstanceOfYourSqlServer for
your SharePoint installation names).
stsadm -o deletecontentdb -url http://UrlOfYourCentralAdministration:p
ortnumber -databasename SharePoint_AdminContent_<GUID> -databaseserver
NamedInstanceOfYourSqlServer or just the name of the SQL Server if there is no
instance name for the SQL Server.
the newly created database with your Central Administration using the
following STSADM command (again be sure to specify the
UrlOfCentralYourAdministration and NamedInstanceOfYourSqlServer for
your SharePoint installation names).
stsadm -o addcontentdb -url http:// UrlOfYourCentralAdministration:
portnumber -databasename SharePoint_AdminContent_DB -databaseserver
to 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 as shown in Figure 8.
Figure 8. Renaming the Central Administration database
If you see a
database with the new name, you can then be sure that the original
Central Administration database is backed up, and you can delete it
from SQL Server.
If you attempt to delete the original SharePoint_AdminContent_<GUID>
database and receive an error indicating there are existing connections
to the database, you probably didn’t disassociate the database from
SharePoint. Repeat the process from the beginning.