Sunday, April 27, 2008 9:41 PM
I ran across a client that was looking to move the SQL Server data files and logs from their SharePoint 2007 installation to another drive. The reason was to free up some space on the drive that SQL Server was installed on. I decided to post the steps that I took so that it might be beneficial for others. Now, with that said, I am not completely positive that my steps are the best possible way; but it did accomplish the task and everything worked when I was done. So I guess the steps I took couldn't have been too bad. J
Here are the steps:
- Quiesce the Farm – This is especially important if you are working on a production system. Pretty much it takes the farm out of commission and doesn't allow any more sessions to be created.
Backup all of the databases that you are looking to move.
- With the client I was working with they were looking to move all of the SharePoint database data and log files. Your needs may vary, but in any case this is another very important step. Be sure you have a current backup of any databases you will be fiddling with.
Turn off SharePoint Services
- This will stop the connections to some of the databases. If you try to detach any of the databases you will find that some will have connections active. In case of the content databases you will probably find that the connections to the have already been taken care of. Either way you will need to stop some of the SharePoint services in order to get the search databases and config database totally disconnected.
You can either stop the services through the Central Administration, or you can do it at the Services Console. I chose the services console since I didn't want to deal with typing in configuring the services again.
To stop the connections to the existing databases stop the following services:
- Office SharePoint Search Service
- Windows SharePoint Services Administration
- Windows SharePoint Services Search
- Windows SharePoint Services Timer
- Windows SharePoint Services Tracing
- World Wide Web Publishing Service
- After the services are stopped, you should be able to detach the databases that you are looking to move.
- After detaching the databases navigate to where the data and log files are being stored and copy them to your destination.
- Reattach your databases.
- Restart your services.
- Un-quiesce the farm.
If everything went well, you should have the ability to get back to your sites and all of your content. If not, you can always roll back to the database data files you previously had in the old location. I would recommend doing a test run on a development machine first to be sure that you not encounter any problems.
Hopefully, you will find this to be helpful in your quest if you run in to the same need.
Happy SharePointing..
Michael