Moving or Renaming the WSS Central Administration Content Database

I finished my MOSS 2007 setup and noticed that one of the databases created was named
SharePoint_AdminContent_92b02fbd-632e-4784-a1fa-a6c5ee437f5a. I really don’t like
the GUID being appended to the end of the database name, so I wanted to change it.

For most content databases in WSS v3, you can follow these steps to rename the content
database

  1. Go to Central Administration > Application Management > Content Databases to
    find the name of the content database your web application is using
  2. On your SQL Server, backup this database, then restore it with the new name.
  3. In Central Administration > Application Management > Content Databases select
    the web app you want to change then select the content database. Delete the content
    database from the details page.
  4. Add a content database from the Content Databases page pointing to the new database
    you created.

I ran into a problem trying this with the Central Administration web application.
I kind of expected this problem, but I think MS should do a better job of warning
you when you go to remove the content database for the Central administration web
site. The problem is that if you use the GUI to remove the content database, you no
longer have access to the gui. To fix this, you must use STSADM from a command line
to add the new content database. Beyond that,I had to run the command line using alternate
credentials because using my credentials, I got an Access Denied error.

Here are the steps I took to rename the Central Administration Web Application

  1. Go to Central Administration > Application Management > Content Databases to
    find the name of the content database your web application is using
  2. On your SQL Server, backup this database, then restore it with the new name.
  3. In Central Administration > Application Management > Content Databases select
    the web app you want to change then select the content database. Delete the content
    database from the details page.
  4. After step 3, you will get an error message on the Central Administration GUI and
    you will not be able to get back into it. If you are not logged into the WSS server
    using the credentials you used for database access, then you will need to run your
    command prompt using the correct database credentials. (I don’t know if this is a
    bug, I know there are parameters to pass a databaseuser and databasepassword to the
    STSADM Command, but they don’t work). In my case I ran
    1. runas /user:domain~Sharepoint2007 cmd.exe
  5. Change to the directory c:program filescommon filesMicrosoft Sharedweb server
    extensions12bin directory and run the command: stsadm -o addcontentdb -url http://servername:42000 -databasename
    Sharepoint_AdminContent -databaseserver databaseservername
  6. >

     

    Random Posts

    Loading…

10 Responses to “Moving or Renaming the WSS Central Administration Content Database”

  1. BPA says:

    Thanks for the post. I couldn’t stand the naming convention used on this db either.

  2. Toby Statham says:

    Hi, I tried the above, but when I try to add the content db using stsadm I get the the following errorSharepoint_AdminContent on databaseserver contains user-defined schema. Databases must be empty before they can be used. Delete all of the tables, stored procedures and other objects or use a different database.Do you know how to resolve this?CheersToby

  3. Great post!Thanks for the useful tip.LaterC

  4. Vicente Sanchez says:

    Great post! Thanks for the tip.Toby Statham,I had the same error. The cause was that I try using the Admin UI to create the new content database. Then, I deleted the database with the hash in its name. Next, when I try to add the content database using the instructions above, I got the error.The solution is to run the deletecontentdb command for the STSADM.exe tool. This will remove the registration of the database in the config database. After doing this step, you can follow Rickey’s instructions above.Hope this helps and the answer doesn’t come to late. It took me a few minutes to realize what I had done to cause the error.

  5. Toby Statham says:

    I have discovered a little gotcha which you may need to be aware of. You can only do this if the account you are logged onto the server is also the server farm accountThis account is also referred to as: Database access account, The application pool account for the SharePoint Central Administration Web site, The process account for the Windows SharePoint Services Timer serviceThe content database for Central administration stores all the users who are Farm Administrators using the standard Sharepoint groups. If you remove this content database it is unable to verify your account is a farm administrator and you get the "Access Denied" message.Not particulary useful if you are using a service account that has had "Logon" rights removed!

  6. Aaron Wiggans says:

    That worked. Thank you so much for creating this blog. Very use full.

  7. Renaming crazy SharePoint Database Names…

    When SharePoint 2007 creates new Content Databases, by default it adds a GUID to the end of the database…

  8. [...] Thanks to Chandima for this tip on how to avoid having GUIDs in your database names. I have a post here that details how to change the database name after the fact, but Chandima tells us how to avoid [...]

  9. Lou says:

    Wish i saw this before I deleted and had to reinstall. BTW if you have to force an uninstall check out this link.

    http://geekswithblogs.net/shehan/archive/2008/07/23/manually-uninstalling-wss.aspx

  10. David says:

    This article just saved me from what could have been the worst day of my life, THANK YOU !!!!!!!!!!!!!!!!!!!!!!

Leave a Reply