Elczar Adame's Shared Points on SharePoint


 

Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007 implementation practically requires moving the content database from one environment to another – from development, to staging, to production. Microsoft has provided us several ways to do this. It could be done using Central Administration facilities, or by STSADM command-line tools. In this piece, I will complete the task using the later approach.

In our source server, let us do the following steps:

1. In the Command Prompt, let us change to the directory where the STSADM command-line tool is located. By default, it is on C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN.

2. The next step is to prepare our content database before moving it by setting up the profile and membership synchronization service. It prevents the synchronization service from failing and losing related settings. To do this, let us type the following command, and then press Enter:

STSADM –o preparetomove –contentdb <content database name>

Prepare

 

3. Now, let us detach our content database by executing the command below. We have to take note, however, that removing the content database simply removes the association of the database with our SharePoint Web application and does not exactly delete the database.

STSADM -o deletecontentdb –url <URL name> -databasename <database name> -databaseserver <database server name>

Delete

4. Let us open our Microsoft SQL Server 2005 Management Studio, and detach the content database. Finally, we will copy the corresponding .mdf and .ldf files to our destination server.

In our destination server, let us do the following steps:

NOTE: It is assumed that you have created a corresponding Web site in you destination server and deleted its content database – like what we have did in steps 2 and 3. With this, we are now ready to restore/move the content database of our source server to the destination server. Thanks Amlan for the comment.

5. Let us open our Microsoft SQL Server 2005 Management Studio, and attach the content database that we transferred in the previous step.

6. In the Command Prompt, let us change to the directory where the STSADM command-line tool is located. By default, it is on C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN.

7. Now, to add the content database to our destination server, let us type the following command, and then press Enter:

STSADM –o addcontentdb –url <URL name> -databasename <database name> -databaseserver <database server name>

Add

 

8. And finally let us start a full crawl. We must be aware, moreover, that a full crawl will occur the first time even if the next crawling scheduled is set to incremental mode in the content database we have restored.

Advertisements

Comments on: "Moving MOSS 2007 Content Database by STSADM Command-Line Tool" (3)

  1. Hi,
    I complete everything successfully but I cant see the new web application . it give me error file not found.  When i am checking by Manage Content Databases I am seeing – Database Status : Started; Current Number of Sites : 0. Please help.

  2. Hi Amlan,
     
    I\’m sorry to hear that. You need first to create a Web site in you destination server and delete its content database like in steps 2 and 3 before proceeding to step 7. I will add it as a note in this piece.

  3. Mohammad Wardat said:

    Hi,
    I’m in process to change the IP adresses of all MOSS 2007 servers farm. The SQL cluster IP also will be changed. Unfortunately, the farm configured by IP and not by the name.
    What should I do to make my SharePoint farm up and running again after changing the IPs. Appreciate your response.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

Tag Cloud

%d bloggers like this: