Whatever the reason for transferring your SharePoint site from one domain to another, it’s not just a matter of copy/paste. It can be tricky. This lab project will highlight the steps needed to move your WSS 3.0 SharePoint site from one domain to another.
We set up a virtual server in our lab, installed WSS 3.0, configured a Web application and created a site collection. The objective will be to move an existing SharePoint site from one of our production servers to the target server.
How to Move SharePoint to another Domain and/or Server (WSS 3.0)
Source Server: The Server we are going to copy the database from.
Target Server: The Server we are going to copy the data to.
First, back up your source server’s database. If you are not sure why, please click here for a quick refresher.
next, Install Sharepoint on the target Server.
Verify that the SharePoint version on the source and target servers is the same. Do to this, open Central administration > Operations > Servers in Farm and the version will be conspicuously displayed.
Gently apply any necessary updates to make sure that both servers are running the same farm version.
Stop the SLQ Service on the source Server.
Locate the content database you want to move. It should be in c:\windows\sysmsi\mssql.2005\mssql\data. In out example, we are going to move MySmartMetric database.
Copy both the content database (.mdf) and the log file (.ldf) to a removable drive.
After the copy/past is finished, restart the SQL service if you don’t want to interrupt the source SharePoint server from operating your SharePoint site.
Paste the database and log file to c:\windows\sysmsi\mssql.2005\mssql\data on the target server.
Once the database and log file have been copied to the target server, install SQL Management Studio on the target server.
Open SQL Management Studio. In the Connect to Server dialog box, enter the following string in the server name:
Click the connect button.
Once connected, right click on the Database folder in the Object Explorer and select attach.
Click Add and find the source database. Select it and click OK.
The content database should now appear in the object explorer under Databases.
Take note of the database’s exact name, you will need it to add it to SharePoint later on.
Expand Databases > DatabaseName > Security > Users and remove the old domain’s service account and add a service account from the target server’s domain. Give the account database owner rights.
On the target server, open SharePoint Central Administration > Application Management > Content Databases.
Click on the content database then place a checkmark in Remove Content Database. You will receive a warning:
In this case, we are removing the default content database. Since this is a new server install, our content database does not have any important sites. If this was a production server, removing the default content database may have negative repercussions.
For a production server:
- Create a Web application with a new content database.
- Create a site collection for this new application.
- This is the content database you will want to remove.
Exit central Administration and open a command prompt.
cd program files\common files\microsoft shared\web server extensions\12\bin [enter]
stsadm –o addcontentdb –url http://SP02 –databasename WSS_Content_MySmartMetric [enter]
Obviously, you must replace http://SP02 with your own site collection’s URL (Central Administration > Operations > Alternate Access Mappings) and WSS_Content_MySmartMetric with your own content database name.
Go to Central Administration > Application Management > Site Collection Owners and enter the primary and secondary site collection administrator.
Once completed, open IIS, right click on the SharePoint content Web site and select browse. Your site should appear.
To finalize, add the site URL in the alternate access mappings (Central Administration > Operations > Alternate Access Mappings) and change the DNS records to point the URL to the new server.
Unless you use a tool such as ADMT to migrate the user accounts from one domain to another, you will need to re-enter the users and set their appropriate permissions from within SharePoint.