Ramblings of a Home Server User

August 30, 2008

Tip – for SharePoint Database Move Scripts

Filed under: Uncategorized — Tom @ 6:30 pm

Hi All,

I know it has been a long time since I last blogged. I’ve decided that I need to get back to regular blogging and now that I have the free time I can. To start us back off, I’m going to post a tip for using the SharePoint Database move scripts.

Some of you have contacted me saying that you haven’t been able to run the scripts because it fails saying the database can not be found. Usually this is because the script is hard coded to look for ‘SERVER’ as the server name, and you are using a different name for your server. I apologize for not making that clear in the documentation and for the delayed response on this, but I’d rather get the information out then see people turned away from the blog. I will be updating the guide with this information soon.

To Change the Server name referenced in DB move scripts:

1. Open sharepoint.sql in Notepad

2. Modify the bolded sections with the name of your server. Then save the SQL script and follow the SharePoint guide as normal.

EXEC sp_detach_db @dbname = ‘WSS_Search_SERVER


EXEC sp_attach_db @dbname = ‘WSS_Search_SERVER‘, @filename1 = ‘D:\SharePointDB\WSS_Search_SERVER.mdf’, @filename2 = ‘D:\SharePointDB\WSS_Search_SERVER_log.ldf’


Happy SharePointing!


UPDATE 2/16/09: I’ve updated the information above to properly reflect the script as distributed and the possible changes one might need to make.



  1. Nice update!

    Comment by Jonas — September 2, 2008 @ 2:21 pm

  2. German Users must patch the File “movesharepoint.bat” in order to run the SQL-Script:

    modify: “C:\Program Files\Microsoft SQL Server….”


    “C:\Programme\Microsoft SQL Server….”

    Comment by SysRUn — February 20, 2009 @ 4:55 am

  3. I have not been able to find the move scripts discussed here.
    I started with the document WSS3.0_WHSv2.0.2.pdf. The link in the document is invalid. I found another link somewhere else, but it started with “cid”, so I had a feeling it would also be invalid, and it is.

    Anyone know where to get the scripts?

    Comment by Glenn N — June 15, 2009 @ 4:49 pm

    • You can find the scripts in the same location that you found the PDF document detailing the steps to Install Sharepoint in WHS.

      Comment by mcfeely — July 15, 2009 @ 8:24 pm

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: