I’m back at it again, moving SharePoint 2007 databases. I’m working with a client who has a SAN with only 100 GB of free space and will be upgrading to a band new SAN and servers in 4 – 5 weeks. However, they would like to get their production environment of MOSS up and running next week. So, this requires a database move.As you know from my previous posts, I’ve attempted to move the databases from one server to another and change the name of the servers and the SQL instance. In the case of the client, this isn’t necessary. They will be decommissioning the old SAN when the new on arrives, so they can give the new server the same server name, IP address and SQL instance. It turns out this makes moving the SQL databases a whole lot easier.

This week in my test environment I created to SQL servers and a MOSS front end server. I installed MOSS and just did a very basic configuration on the first SQL Server. Then I backed up all the databases, saved them to my web front end, and shut down SQL Server 1. I booted up SQL Server 2 with the same name, IP and SQL Server instance and restore my databases into this server. I performed an IIS reset on my MOSS front end and tried to hit the websites. I received an error message that the server could not connect to the databases. After thinking about it for a few minutes, I thought SQL Security, MOSS automatically sets up security on the databases when you do configuration. The databases have security set up from the restore…but those users don’t have logins set up in SQL. I open up SQL Management studio and added the domain logins I used to set up MOSS, performed another IIS reset on my MOSS front end, just to be sure, and hit my Central Admin, Shared Services and a Web Application I created. All of them came right up and worked beautifully.

Moral of the story…if you think you want to move your SharePoint databases, the best way is to get a new server, set it up with identical network and SQL information to the old one, put your databases on the new server and get rid of the old one.