• WSS v3 – Moving A WSS v3 Database

    My company provided me a very old server with two hard drives. The C drive is about 30 gig, the other about 72 gig. I found the task of moving my database was needed shortly after launch of the SharePoint server. The database I setup had already reached up to 2.3 gig. Which meant the page file was going to reach ATLEAST that.  Reading and writing from both the page file and the database files from the same drive didn’t make much sense to me either. So, I began to research the move process.

    I found a couple sources that had the information I needed. I have to say that Chicagotech.net had an excellent resource on moving a database. Kudos to you guys! Their process was quite flawless on the database site. For the WSS application itself, it required a little bit more.

    Before you cut off the database and move it, you need to shut down some if the Sharepoint services. I listed the script below for your refrence. Though, your services might not be named the same as mine, they probably are the same as I didn’t stray from the norm on my WSS configuration. Excluding configuring it to be used as a farm later on.

    The biggest oversite I found, that nobody mentioned, was that the database files will lose their Windows security permissions. Make sure you apply the Sharepoint service accounts full access to the two database files (I list this at the end of the process).

    1) Stop all Sharepoint Services….

    net stop SPAdmin
    net stop SPWriter
    net stop SPTimerV3
    net stop SPSearch
    net stop SPTrace
    net stop MSSQL$YourSharepointDbNameHere


    2) Detach the database….



    3) Move the database…

    xcopy “C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataWSS_Content.mdf” E:WSS_ContentWSS_Content.mdf /v /f
    xcopy “C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataWSS_Content_log.LDF” E:WSS_ContentWSS_Content_log.LDF /v /f


    4)Configure the proper windows Sharepoint service account’s security permissions to the moved MDL & LDF files.

    5) Reattach the database…



    6) Start all Sharepoint Services….

    net start SPAdmin
    net start SPWriter
    net start SPTimerV3
    net start SPSearch
    net start SPTrace
    net start MSSQL$YourSharepointDbNameHere