skater coder

angela chng – Ruby on Rails / PHP web developer & skater girl in Singapore

  • blogabout stuff
  • aboutthis website
  • contactdrop a message

April 10, 2007
Posted by roadburn

Move Sharepoint 2007 Content Database

Ok here’s the situation.

I’ve installed Sharepoint Server 2007 and SQL Server 2005 as a small farm on the same server with the intention of moving the SQL Server database to another server at another date. Unfortunately detaching all the databases and moving them to the new server and running the Sharepoint Configuration Wizard to try and connect to another server farm doesn’t quite do the trick.

Here’s how I eventually managed to move the content database from one server to another. It’s rather general, and from memory, but it should be enough to give you an idea of what to do.

  1. Run “Sharepoint Products and Technologies Configuration Wizard” and disconnect from the server farm.
  2. Run “Sharepoint Products and Technologies Configuration Wizard” again, and this time choose “create a new configuration database”, and key in the server name SQL Server database you wish move your content to. (I haven’t found a way to migrate the Sharepoint_Config and Sharepoint_AdminContent database files yet)
  3. Click “Advanced” and select host admin site on this server.
  4. After which, you should be able to access the “Sharepoint 3.0 Central Administration” site.
  5. In Central Administration, create a new web application
  6. Detach the WSS_Content database files from the source server, and copy to the target server.
  7. Attach the WSS_Content database files on the new SQL Server 2005 server.
  8. In Central Administration->Content Databases Delete the content data that was just created, and then add a new content database. Name this content database the same as the content_database file you just attached.
  9. That’s it, you should be able to view the content you’ve just moved in the web application you created

Downsides, you won’t be able to move the sharepoint_config database, which means you will have to reconfigure your sharepoint installation again.

If you installed MOSS2007 and SQLServer 2005 on different servers and just want to move the database to another server, this article will show you how to do that.
http://blog.baeke.info/blog/_archives/2007/2/23/2759975.html

1 Comment

Posted Under Sharepoint

1 Comments

Steven Oberholzer
November 19, 2008

We sat with issues in our Production Environment and had to get a Development environment up that was identical to the Production environment. Identical because there were potentially issues with the database as people had gone into the database and made direct database changes, something which you should never do…

Quick way to do it:
1. Take a backup of your production content db.
2. Take a backup of your dev content db.
2.1. Make sure that you get the GUID of the SiteID of the Sites table in the original content database. This is at this moment referenced by the Config database in the SiteMap (and potentially the Sites) table.
3. Restore the production db backup over the dev content db.
4. In SQL Enterprise Manager:
4.1. Get the GUID of the site record in the Sites table in the Content DB – the new content db that you’ve just restored. This will definitely differ from the GUID in the Config DB.
4.2. Update the Config DB’s SiteMap (and maybe Sites) table where the ID is equal to the previous ID, to the new Site ID.
5. Perform an IISRESET.

WARNING:
1. It is not wise to play around in the SQL Databases.
2. Be careful that you don’t have references in lets say document libraries, to the Production document libraries, as you might inadvertently update or delete these documents.

Leave a comment

* = Required

  • CATEGORIES
    • Coding Tips
    • Food
    • Portfolio
    • Rails
    • Sharepoint
    • Wordpress

  • TAGS
    activities AD ADAM ajax architecture authentication bluehost books custom application custom form date design disk partition ECTS event id eventid moss forum guid hotfix iis imap keberos list id lists masterpage moss mysite profiles Rails rails 2.0 reporting services ruby Sharepoint sharepoint 2007 site templates site usage sql server 2005 time updates vhd virtual pc visual studio webparts workflow wss

Subscribe via RSS