One of the common business requirements is to have a custom name for the Admin Content (Central Administration) Database. There are two ways to achieve that. One is to choose the custom name while installation and the second way is to rename the databases after the initial configuration.
It is possible to have a custom Admin Content DB name while setting up SharePoint for the first time. Follow these steps to achieve a custom name for the Admin Content Database and SharePoint Configuration Database.
1. Install SharePoint 2007 and all associated updates (such as SP1, and the latest cumulative updates). Do not run SharePoint Configuration Wizard.
2. Open up Command Prompt in Admin Mode (Run as Administrator).
3. Go to BIN folder or add the path c:\Program Files\Common Files\microsoft Shared\Web Server Extensions\12\BIN to environment variables to access PSCONFIG.EXE from anywhere.
c:\Program Files\Common Files\microsoft Shared\Web Server Extensions\12\BIN
a. To Add a Path either use the Environment Variables menu or via REGEDIT in the following path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
a.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
4. Type the following command to create the Configuration and the AdminContent Database
Psconfig –cmd configdb –create –server <YourDatabaseServerName> –database <YouyCustomSharePoint_ConfigDBName> –user <domain\FarmAdminUserAccount> –password <FarmAdminPassword> –adminicontentdatabase <YourCustomAdminContentDBName>
In the screenshot below, ContosoSQL is our Database Server and contoso\MOSSAdmin is our SharePoint Farm Administrator Account.
Once the command finishes, you will get the Custom database names:
5. After this you have to provision the Central Administration Site, preferably with a port number that you can easily remember. Use the following command to achieve this:
psconfig.exe -cmd adminvs -provision -port 12345 -windowsauthprovider onlyusentlm
Onlyusentml is used to configure SharePoint in NTML (default). If you need SharePoint to be configured in Kerberos there are additional steps required. Refer to Configure Kerberos authentication (Office SharePoint Server) (http://technet.microsoft.com/en-us/library/cc263449.aspx) article for more information.
6. The next step is to secure the registry entries. Run the following command:
psconfig.exe -cmd secureresources
The following steps are required if this is fresh install.
7. To install the Help Collection run the following command:
psconfig -cmd helpcollections –installall
psconfig
-cmd helpcollections –installall
8. Register services in the server farm:
psconfig -cmd services –install
The rest of the steps can be performed via the GUI or command line.
9. Start the Windows SharePoint help search.
10. Start the Office SharePoint Server Search.
11. Provision the services of the farm psconfig -cmd services –provision
psconfig -cmd services –provision
12. Register all features - psconfig -cmd installfeatures
-cmd installfeatures
13. Configure shared service administration.
Renaming the Admin Content DB - post install
Often when you will visit the client you will see that SharePoint has already been deployed and that the default Admin Content DB name is Admin_Content_<GUID> .
To change the names to something more meaningful, follow the steps below.
Follow the steps below to rename the admin content database
stsadm.exe -o preparetomove {-ContentDB <DatabaseServer:DatabaseName> | -Site <URL>} [-OldContentDB <uniqueidentifier>] [-undo]
NOTE: If the database size is huge, for example a site content database, use the stsadm tool to do this. (Ref: http://technet.microsoft.com/en-us/library/cc262449.aspx). You may get an unknown error after the database is removed, which is okay. This error doesn’t appear if you are removing the DB from command prompt.
4. Go to SQL Server (using an account with Admin permissions) and restore the backup of the Admin Content Database with a new name. You can also rename the LOG and MDF file now.
stsadm -o addcontentdb -url <CentralAdminURL> -databasename <YourCustomDatabaseName> -databaseserver <YourDatabaseServerName>
5. From the Manage Content Database you can verify the new database associated with your central Admin Site.