Restore Sharepoint WSS 2 Database

I was trying to upgrade to WSS 3 and something failed so I wanted to return to WSS 2 so I reinstalled WSS 2 and tried to attached my backuped databases. I received the "Database ‘Database_Name’ already exists. (Error code:1801)" error message which I could resolve by following KB828815. But then I received the a further error message which seemed to reflect a version confilct that I could not solve. So I decided to copy the database manually with the following steps:
  1. Create a New Site (including new content database e.g. STS_new_234)
  2. Use the SQL Server management studio to attach/restore the old content database e.g. STS_old_123)
  3. Get the new SiteId from the [STS_new_234].[dbo].[Sites] e.g. {61806ab3-c940-4867-8f5a-629c0036e6bd}
  4. Copy the data of all tables (exept Sites) from the STS_old_123 to STS_new_234 and rename the field SiteId to the new SiteId in the process e.g.
    INSERT INTO [STS_new_234].[dbo].[NavNodes]
    SELECT ‘61806ab3-c940-4867-8f5a-629c0036e6bd’
          ,[WebId]
          ,[Eid]
          ,[EidParent]
          ,[NumChildren]
          ,[RankChild]
          ,[ElementType]
          ,[Url]
          ,[DocId]
          ,[Name]
          ,[DateLastModified]
          ,[NodeMetainfo]
          ,[NonNavPage]
          ,[NavSequence]
          ,[ChildOfSequence]
      FROM [STS_old_123].[dbo].[NavNodes]

    Note: The most important tables: Docs, Links, NavNodes, UserData, UserInfo, WebCat
  5. Modify the [STS_new_234].[dbo].[Webs]:
    • First make the old root a sub-site by editing FullUrl and setting ParentWebId to the new root.
    • If all is now well try and exchange the new root with the old root (again by editing FullUrl and ParentWebId accordingly).

NOTE: The whole issue probably could have been avoided by running PRESCAN on all the existing databases BEFORE starting to upgrade.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s