Home

Wednesday, July 23, 2008

SharePoint V3: How to Rename and Migrate a Content Database From a SQL Express Farm to a SQL Server SE or EE Farm

Here are the steps to follow if you need to migrate (SQL upgrade would be a different approach from this) a SharePoint content database from one farm which has SQL Server Express 2005 to a separate farm which has SQL Server SE or EE 2005.

* Verify the number of site collections in the content database you are planning to migrate
- Launch SharePoint Central Adminsitration from the SQL Express Farm
- SharePoint Central Administration > Application Management > Content Databases > contentdb_old > Current Number of Sites >
The number of site collections will appear. Note this number.


* If the SQL Express Farm is active, notify the users of maintenance

* Stop services
- Control Panel > Services > Stop the following services:
WWW Publishing Service
SQL Server Service

* Copy the data and log files from the source database server's data directory to destination database server's data directory
E.g.
Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\contentdb_old.mdf
Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\contentdb_old_log.ldf


* Rename the data and log files
E.g.
Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\contentdb_new.mdf
Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\contentdb_new_log.ldf


* Attach the databaseSQL Server Management Studio > right click databases node > select "Attach"
-Attach a Database > Click "Add"Browse to the SQL data file > Select contentdb_new.mdf
-Attach Databases > Databases to Attach > Attach As column> Modify the "Attach As" name to contentdb_new

-Attach Databases > Databases to Attach > Owner column > Modify the "Owner" name
-Attach Databases > Database Details > Current File Path > Modify the data file location and name (contentdb_new.mdf)

-Attach Databases > Database Details > Current File Path > Modify the log file location and name (contentdb_new_log.ldf)
-Click "OK"


* Create a new SharePoint web application on SQL Server SE or EE farm
- SharePoint Central Administration > Application Management > Create or Extend Web Application
- Configure the web application directory location and IIS application pool names according to naming convention
- Name the default content database "deleteme" as it will be deleted in the next step

* Delete the default content database
-SharePoint Central Administration > Application Management > Content Databases > Click the "deleteme" content databaseManage Content Database Settings for "deleteme" > Click "Remove Content Database" > Click "OK"
-SQL Server Management Studio > Databases > right click "deleteme" database > Click "Delete"

-Check "Delete backup and restore history information for databases"
-Check "Close existing connections"
-Click "OK"

* Configure alternate access mappings for the new web application
- SharePoint Central Administration > Operations > Alternate Access Mappings > Add all of the necessary AAM's to the new web application, make sure the default URL is fully qualified

* Configure DNS
- Active Directory > DNS > Configure the necessary host (a) records or alias records

* Configure IIS Host Headers
-IIS Management > Right Click Web Site > Properties > Web Site Tab > Click "Advanced"
-Add the appropriate host headers to match the alternate access mappings

* Attach migrated content database to the new web application
- Start > Run > CMD > Type the following:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN> Stsadm.exe -o addcontentdb -url http://webapplication -databasename contentdb_new -databaseserver servername

* Run IISReset
- Start > Run > CMD > Type the following:
iisreset /restart

* Verify the number of site collections in the content database that has been migrated
- Launch SharePoint Central Adminsitration from the SQL Express Farm
- SharePoint Central Administration > Application Management > Content Databases > contentdb_new > Current Number of Sites
You will now see the content database you migrated. The number of sites should match the number of sites in the source content database.

* Perform follow up tasks
- Since the migration is now complete, it is ok to start the WWW Publishing and SQL Server services on the SQL Express farm
- Verify the new web application by navigating the its URL
- Recreate audiences on the new farm's SSP and then re-configure audiences accordingly on web parts used throughout the migrated site collection
- Verify and update hyperlinks throughout the migrated site collection
- Notify users that the web application has been migrated and that it has a new URL

No comments:

Blog Archive

Followers