First of all i'll tell you the steps how to copy your existing Site DB to a new Server.
STEP1: BACKUP:
Central Admin>Application Management>Content databases>Select web application from Right Hand Side Top drop down list
Database name will be displayed.
Step 2:Prepare the destination SQL server and Web server.
Then there might be an existing Content DB id in your sharepoint installation configuration DB.
Here is the workaround. First find out the Id of the sites (site collection) in the [restored_db].Sites then delete the line in the [Config_db].SiteMap with the same Id. Now attach the content_db and you should see the sites.
Or what you can do is change the ID inside the [config_db].SiteMap to something else, maybe change a number.
Reference:
http://dhyansharepoint.blogspot.sg/2009/06/content-db-restore-by-sql-db-move.html
STEP1: BACKUP:
- On Source SQL Server: Backup SharePoint Content databases.
- Open SQL Server Enterprise manger
- Right Click a database (For ex: WSS_Content)>All Tasks>Backup Database>Database Complete>Backup to disk>Add>Filename>Provide a path & filename>Ok>Ok
Central Admin>Application Management>Content databases>Select web application from Right Hand Side Top drop down list
Database name will be displayed.
Step 2:Prepare the destination SQL server and Web server.
- Install the same versions of Service Packs for SQL and MOSS 2007, similar to your production server.
- Ensure you use the similar Admin user which would have full access as service account for both Web server and SQL server. (Check Security Administrators & Database Creators)
- Copy backup Content database files to Destination SQL Server
- Open SQL Server Enterprise manger
- Create a database in your destination SQL, give the same name that of your backed up DB
- Databases>Right Click>All Tasks>Restore database>Restore as Database>Type name of Content Database>From device>Select device>disk>Add>Browse to backup files>Ok>
- Create a new web application http://
at port 80 with content database name WSS_Content_TEST ( this Database we will remove and replace with out backed up DB) - Go to V3 Central Administration Page>Application Management>Create or extend Web Application
- Click on Create a new web application
- Choose any unused port no you can fancy
- Enter Database Server Name and enter Database name as WSS_Content_TEST
- Wait for operation to complete
- After application is created create a site collection, ( you can give any name eventually it'' not be used)
- Fill the details and select Team site template click Ok
- Browse to test site http://
- Check if it is working
To remove WSS_Content_TEST from a web application - Go to Central Administration, Central Administration > Application Management > Click on Content Databases
- On right hand side select the newly created web application if not already present
- Click on Database name WSS_Content_TEST
- Check remove content database checkbox and click OK
To attach restored content database to a new web application:
Open a command prompt and browse to
c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin>
Run following command
stsadm -o addcontentdb -url http://-databaseserver Mossdev -databasename BackupDBName -assignnewdatabaseid
Where Mossdev is my Database server name
BackupDBName is my BackedUp Database that i've restored in SQL.
Check if the sites collection has be restored in your new server - Go to Central Administration, Central Administration > Application Management > Click on Content Databases
- On right hand side select the newly created web application if not already present
- Check the No. of sites in the site collection if its showing same no. that you had in your Restored Content DB webapplication.
- Then you are done with it. check the URL of the application, to view your restored Sharepoint Site.
Then there might be an existing Content DB id in your sharepoint installation configuration DB.
Here is the workaround. First find out the Id of the sites (site collection) in the [restored_db].Sites then delete the line in the [Config_db].SiteMap with the same Id. Now attach the content_db and you should see the sites.
Or what you can do is change the ID inside the [config_db].SiteMap to something else, maybe change a number.
Reference:
http://dhyansharepoint.blogspot.sg/2009/06/content-db-restore-by-sql-db-move.html
No comments:
Post a Comment