SharePoint 2003 to SharePoint 2007 Migration using Database Attach Method: Step by Step

In this article, I’ll be walking through the complete step-by-step procedures on migrating from SharePoint 2003 to MOSS 2007 using the database attach method.


How to migrate SharePoint 2003 to SharePoint 2007? Migrating from SPS2003 to SharePoint 2007 on the Database attachment method involves four tasks below.

  1. Run PreScan.exe in SPS 2003 server.
  2. Take the back up of content database of SharePoint Portal Server 2003.
  3. Restore the content databases back up on SQL Server of MOSS 2007.
  4. Create web application in MOSS 2007.
  5. Attach the SPS 2003 databases to MOSS 2007.

1. Run Prescan.exe in SPS 2003 Server

  • Download & Run the prescan.exe as below in command prompt: prescan.exe /c preupgradescanconfig.xml /all
  • Download URL:
  • To resolve issues, follow the reference:

2. Take the Content Database Backup from SPS 2003Set the database to read-only before taking backups.

Set the database as read only:

  1. In Microsoft SQL Server Enterprise Manager, right-click the name of the database that you want to set to read-only, and then click Properties.
  2. In the Properties dialog box, click the Options tab.
  3. Under Access, select the Read-only check box, and then click OK

Backup the database:

Follow these steps to take backup

  1. On the SPS2003’s database server, click Start, point to All Programs, point to Microsoft SQL Server, and then click Enterprise Manager sharepoint 2003 to sharepoint 2007 migration
  2. Traverse to Databases node by expanding the tree.
  3. Right-click the database you want to back up, point to All Tasks, and then click Backup Database
  4. migrating from sharepoint 2003 to sharepoint 2007  
    In the SQL Server Backup dialog box, specify a name for the backup, select Database – complete, select an existing destination, and then Click OK to start the backup process.
    5. Repeat these steps to back up the databases that are used by SharePoint Portal Server 2003 in your environment.

3.  Restore the back up on MOSS 2007’s SQL Server:

  1. Open the SQL Server Management studio, traverse to “Databases” node. Then right-click the “Databases” and choose “Restore Database…” from the context menu. sharepoint 2003 to 2007 database migration
  1. Specify the Database name, Restore Source, Destination, File names in the following screens. migrate sharepoint 2003 site to sharepoint 2007

Specify the file name and locations

restore sharepoint 2003 to sharepoint 2007
sharepoint 2003 to moss 2007 upgrade database migration
  1. Click “OK” to start the restore operation and Wait for the restore to complete! The time of restoring database depends upon the database size and server’s capacity.

    Once the migration from SharePoint 2003 to SharePoint 2007 is completed, set the database compatibility level to the recent version in SQL Server

4. Create web application in MOSS 2007

  1. In the SharePoint Central Administration, click on “Application Management” and click on “Create or extend Web application” under “SharePoint Web Application Management”.
  2. Again click on “Create Web application”. Set the settings according to the needs say
  3. Don’t create any site collection.
  4. Install & Copy the solutions, file system changes (like images, themes) from SPS 2003 to MOSS 2007 servers.

Remove content database of the newly created web application in MOSS 2007:
Now, we need to delete the content DB of the newly created web application to avoid URL conflicts. Run the below stsadm command:

stsadm -o deletecontentdb -url -databasename <MOSS2007_Migration_Content>

5. Attach restored database with the newly created web application in MOSS 2007

Finally, we need to attach the restored SPS 2003 database to MOSS 2007 by running the STSADM

stsadm -o addcontentdb -url -databasename <SPS2003_Portal_Content>

sharepoint 2003 to moss 2007 migration

Unit Test: 

We are done with SharePoint 2003 to SharePoint 2007 migration! Browse the migrated sites in MOSS 2007 and check their look and feel, and functionality.

Related Post: Migrate from MOSS 2007 to SharePoint 2010 – Step by Step

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

One thought on “SharePoint 2003 to SharePoint 2007 Migration using Database Attach Method: Step by Step

  • Hello,
    To ensure data integrity and secure the DB migration, you should perform additionnal steps, as decribed in the following article.

    1.Launch a DBCC CHECKDB with option DATA_PURITY :

    2.Update DB statistics :

    3. If you keep the old compatibility mode, you will only put performance impact on query optimizer and query parsing.


Leave a Reply

Your email address will not be published. Required fields are marked *