Tuesday, March 27, 2007

Renaming the Central Admin Content Database

I worry sometimes that I might be just a little too pedantic. I can spend way too long figuring out an ideal naming convention. So you can imagine my distress to discover that MOSS 2007 does not give you the option to name the Central Administration content database.

You are able to specify a name for every other database in your installation except this one. It's pretty upsetting for someone as anal as me. All the other databases have a naming pattern that you could write a song to, but the Central Admin content database uses some horrid GUID for it's name.

I decided that I needed to fix this. There is a good reason for this - your SQL Server might host a few Central Admin content databases from different SharePoint Farms. In which case it would be nice to know which SharePoint farm the database belonged to without having to check a list of GUIDs somewhere.

In theory it's relatively straight forward - here are the steps, taken mainly from Ricky Whitworth's blog entry:
1. From Central Admin, remove the existing content database from the Central Admin Web Application.

WARNING: This will break your Central Administration site until you complete the rest of the steps!

2. Backup the existing Admin content database from SQL
3. Restore the backup to SQL using a name that makes you happy
4. Use the STSADM -AddContentDB to attach your renamed content database into your Central Admin site

It was this final step that caught me out. I kept getting a "Access Denied" message. This is not particularly what you want to see when you have just broken your Central Admin site.

What I discovered is that you need to run this command using the AD account that you specified for connecting to the database during your SharePoint installation. Now normally this account should not be a local administrator on your web front end server. However I also found that the command did not work for me until I made this account a local administrator.

So here are the extra steps I carried out between 3. and 4. above:

1. Grant the account running the Central Admin application pool access to the Local Administrators group on your SharePoint server

2. Use the "runas /user:myDomain\myAccount cmd.exe" command line to launch a command window under the credentials of the Central Admin application pool account.

3. Run the following command in your new command window:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addcontentdb -url myCentralAdminSite -databasename myCentralAdministrationContentDatabase

4. Remove the account from the Local Administrators group

Update:Here is a post from Keith Richie on how you can use psconfig.exe to set the database name during your initial installation

Wednesday, March 21, 2007

What a crazy week

I'm just back from the Microsoft MVP Summit in Seattle. What a whale of a time. I finally got to meet many of the other SharePoint MVPs in person. We even spent some time with the SharePoint product team giving our input into what we think is important for the next release of MOSS.

If only every week was as interesting as that. You can check out some photos of the week here

Now, must get back to work

Wednesday, March 07, 2007

SharePoint Conference - Sydney May 15-16 2007

The circus is coming to town!

Well, almost as exciting - the SharePoint Conference is coming. Sydney is the third city to host this show, with great reviews already in from Seattle and Berlin.

The conference is going to be at the Hilton Hotel and will include such SharePoint greats as Mike Fitz, Joel-The-Man-Oleson and ring master Derek Burney. With any luck the Sydney SharePoint User Group will also be well represented.

There are only 500 places available so make sure to book the 15 and 16 of May out in your diary now. Registration for the event will open soon. Check out Angus Logan's blog for more details.

Monday, March 05, 2007

No Underscores in MOSS

I just found out that MOSS doesn't like Underscores in Host Headers. If you try to create a new web application with the "_" in the Host Header, SharePoint rejects it as an invalid character.

This also applies to setting up Alternate Access Mappings for an existing web application

Saturday, March 03, 2007

How do I...in SharePoint 2007

Check out this new content on MSDN that descibes how to do common development tasks in SharePoint 2007:

http://msdn2.microsoft.com/en-us/library/ms550086.aspx