Move MOSS 2007 Web Application to another server
How to migrate MOSS 2007 Web Application to across servers
SharePoint Portal Server 2007 central administration provides web interface to take Web Application (formerly called portal site in SPS 2003) backup and restore, but sometime, database restore fails due to number of reasons. The work around to move SharePoint 2007 web application is to take content database backup and restore it on destination (either same or different domain) and attach the database by using STSADM command line tool.
Steps required moving web application is defined below:
Step # 1: Identify Content Database (s) of Web Application
- Open MOSS 2007 Central Administration
- Go to "Application Management" Tab and Click link "Site Collection List" under "SharePoint Site Management".
- You can Content Database Name under database column as shown in the figure below.
Step # 2: Content Database Backup
- After identifying the content database in the previous step, take the identified database backup by using SQL Server 2005 Management Studio.
Step # 3: Restore Content Database on Destination Server
- Logged into Destination Server and restore content database by using SQL Server 2005 Management Studio
Step # 4: Create New Web Application on Destination Server
- Open MOSS 2007 Central Administration on destination server.
- Go to "Application Management" Tab and Click link "Create or extend Web Application" under "SharePoint Web Application Management".
- Next Screen click "create a new web application".
Step # 5: Detach/Remove Content Database of Web Application
- Click "Content Databases" under "SharePoint Web Application Management" on Application Tab.
- Next Page, Select you're newly created web application and then click content database as shown in the figure below.
Note: Normally content database name is WSS_Content_[GUID].
- Next Page, Choose "Remove Content Database", you will get a warning message.
- Click "OK".
See figure below:
- Click "OK" button at the bottom of the page to remove content database.
Step # 6: Attach Content Database of Web Application
- Now there is no content database associated with web application.
- In order to attach content database restored on Step # 3, we will use STSADM command line tool.
- Open Command Prompt, navigate to folder "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN"
ú Run the following Command:
stsadm -o addcontentdb -url [http://webapplication:port] -databasename [WSS_Content_GUID] -databaseserver [Database Server Instance]
- Replace URL, databasename and database server name according to your scenario.
- After running the command you will get a message “Operation completed successfully”.
- Now restart IIS by running IISRESET Command on command prompt.
Browse the web application again and you will see that web application is restored successfully with full functionality.

This entry was posted
on Friday, January 26th, 2007 at 3:08 pm and is filed under Uncategorized.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Move MOSS 2007 Web Application to another server
How to migrate MOSS 2007 Web Application to across servers
SharePoint Portal Server 2007 central administration provides web interface to take Web Application (formerly called portal site in SPS 2003) backup and restore, but sometime, database restore fails due to number of reasons. The work around to move SharePoint 2007 web application is to take content database backup and restore it on destination (either same or different domain) and attach the database by using STSADM command line tool.
Steps required moving web application is defined below:
Step # 1: Identify Content Database (s) of Web Application
- Open MOSS 2007 Central Administration
- Go to "Application Management" Tab and Click link "Site Collection List" under "SharePoint Site Management".
- You can Content Database Name under database column as shown in the figure below.
Step # 2: Content Database Backup
- After identifying the content database in the previous step, take the identified database backup by using SQL Server 2005 Management Studio.
Step # 3: Restore Content Database on Destination Server
- Logged into Destination Server and restore content database by using SQL Server 2005 Management Studio
Step # 4: Create New Web Application on Destination Server
- Open MOSS 2007 Central Administration on destination server.
- Go to "Application Management" Tab and Click link "Create or extend Web Application" under "SharePoint Web Application Management".
- Next Screen click "create a new web application".
Step # 5: Detach/Remove Content Database of Web Application
- Click "Content Databases" under "SharePoint Web Application Management" on Application Tab.
- Next Page, Select you're newly created web application and then click content database as shown in the figure below.
Note: Normally content database name is WSS_Content_[GUID].
- Next Page, Choose "Remove Content Database", you will get a warning message.
- Click "OK".
See figure below:
- Click "OK" button at the bottom of the page to remove content database.
Step # 6: Attach Content Database of Web Application
- Now there is no content database associated with web application.
- In order to attach content database restored on Step # 3, we will use STSADM command line tool.
- Open Command Prompt, navigate to folder "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN"
ú Run the following Command:
stsadm -o addcontentdb -url [http://webapplication:port] -databasename [WSS_Content_GUID] -databaseserver [Database Server Instance]
- Replace URL, databasename and database server name according to your scenario.
- After running the command you will get a message “Operation completed successfully”.
- Now restart IIS by running IISRESET Command on command prompt.
Browse the web application again and you will see that web application is restored successfully with full functionality.

This entry was posted
on Friday, January 26th, 2007 at 3:08 pm and is filed under Uncategorized.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.