locked
WSS 3.0 - Moving Database files (same server, different disks) RRS feed

  • Question

  • Greetings all,

     

    We have a WSS 3.0 server that was (as I learned when I inherited it) installed using the Windows Internal Database (##SSEE) and the default c: data location.  As part of our Sharepoint performance tuning, and to allow expansion, I’m planning to move the databases from the default location to a new D: drive on the same (virtual) server.  I was able to find the following page that went through how to do it from the command line:

     

    http://www.wssdemo.com/Pages/db.aspx

     

    Since this is a Highly Visible internal site, and I am a n00b Sharepoint admin, I'm looking for validation/a reality check on my process. 

     

    I also have SQL Management Studio Express working on the server.  If I can do portions from Mgmt Studio Express instead of the command line, I’d prefer to – less possibility for typos.    I was able to shrink the DB logs for the first time ever using the GUI once I learned the Named Pipes string for accessing Windows Internal Database – since I’m not an experienced DBA, I was very pleased by the results and didn’t have to chase down the SQLCMD tools (which have since been installed).   

     

    These are the steps I have based on my research:

     

    a)      Use WSS admin to mark the Content database OFFLINE (in Application Management) – we only have one content database

    b)      Stop all the Sharepoint services (is there a particular order?)

    c)       Stop all the IIS services

    d)      Detach the four Sharepoint databases either by running SQLCMD and then the EXEC SP_detach_db command  e.g.

     EXEC sp_detach_db @dbname = 'WSS_Content'
    Go

     or via Mgmt Studio Express  – should this be restricted to single-user first?

    e)      Copy the files from C: to D:\DATA

    f)       Attach the databases with the attach command in Mgmt Studio Express or with EXEC sp_attach_db   (sample syntax: 

    EXEC sp_attach_db @dbname = 'WSS_Content', @filename1 = ‘d:\data\WSS_Content.mdf', @filename2 = 'd:\data\WSS_Content_log.ldf'
    Go

    g)      Start IIS

    h)      Start sharepoint services (should this be before IIS??)

    i)        Go back into WSS admin and mark the content database Ready

    j)        Try loading the site and test test test

    k)      Make any necessary changes in the Backup Exec configuration

    l)        Cleanup:  remove Sharepoint databases from C:

     

    My questions are:

    1)       Any “gotchas” that people who have done this want to warn me about? 

    2)      Am I missing a step or creating extra work for myself somewhere?  Other comments? 

    3)      Is there any particular reason to not do the attach/detach from SQL Management Studio Express?

    4)      Is there a particular order the Sharepoint services should be stopped/started in?  Before or after IIS?

    5)      Are there any cleanup administration tasks I should do in Sharepoint either at original step a) or after j)?

     

    Many thanks in advance. 

                    Best regards,

                    Charlotte

    Wednesday, February 23, 2011 11:31 PM

Answers

  • Hi Charlotte,

    There are 5 steps to move the databases to different drive:
    1. Stop all SharePoint services.
    2. Detach the databases.
    3. Move the databases files to the new location.
    4. Reattach the databases and log files.
    5. Restart the SharePoint services.
    No need to stop IIS.
    Please move the database follow this reference.
    Move Windows Internal Databases to a different drive (WSS 3.0):
    http://technet.microsoft.com/en-us/library/dd277864(office.12).aspx

    Thanks & Regards,
    Emir

    Friday, February 25, 2011 9:36 AM

All replies

  • Hi Charlotte,

    There are 5 steps to move the databases to different drive:
    1. Stop all SharePoint services.
    2. Detach the databases.
    3. Move the databases files to the new location.
    4. Reattach the databases and log files.
    5. Restart the SharePoint services.
    No need to stop IIS.
    Please move the database follow this reference.
    Move Windows Internal Databases to a different drive (WSS 3.0):
    http://technet.microsoft.com/en-us/library/dd277864(office.12).aspx

    Thanks & Regards,
    Emir

    Friday, February 25, 2011 9:36 AM
  • Emir,

    I added "stopping IIS" to that procedure out of an excess of caution and on recommendation of our support VAR and everything worked fine.  No need to mark the database offline and using the SQL Server Express GUI to detach/reattach files worked great.

    Thanks for the validation - this sharepoint server is our intranet and file-sharing server, so is highly, highly visible!

    Charlotte

    Thursday, March 3, 2011 11:14 PM