Every time I attached Content Database to web application it deleted the stored procedures and failed with the following error in the log file:
[SPManager] [ERROR] : Cannot find the object "DatabaseInformation" because it does not exist or you do not have permissions.
I researched a lot of the posts out there and they were all dealing with upgrade uissues. The problem was this was not an upgrade this was the same database attached one day ago. After trying to to move a site off it and it failed so I tried to reattach it to get the site out the backup and it kept failing!
I tried using tools like DocAve and Metalogix to move data and/or site off it but they also failed.
Finally, I attached a clean db to the portal “New_DB”. Then I renamed the corrupted database to New DB.
It was now attached to the web application however it has 0 sites!
So I created a site on it called test
I then tracked down the ID for the corrupted site and the new test site from Corrupted Database Now “new_DB”
SELECT [Id]
,[SiteId]
,[FullUrl]
FROM [New_DB].[dbo].[Webs]
Once I the ids they look like this corrupted(887E0ED3-9CDD-42EC-8A38-6D397349169B)
new test site (0477CF53-F1C0-4CDD-9FDF-D1F61A10DE8A)
I went into the SharePoint_config db
WARNING: this is very dangerous make sure you backup the db and copy tables before altering.
I looked for the new test site I created
SELECT
*
FROM [SharePoint_Config].[dbo].[SiteMap]
where id ='0477CF53-F1C0-4CDD-9FDF-D1F61A10DE8A'
I grabbed the ApplicationId something like this '3B988D4F-4AD6-40F1-B7A8-8A4EBA9FC12D'
Now I ran an update statement to set the path and id for the new site (test) to the path and id of the corrupted site
update [SharePoint_Config].[dbo].[SiteMap]
set path= '/sites/oldsite'
where ApplicationId=
'3B988D4F-4AD6-40F1-B7A8-8A4EBA9FC12D'
and id='0477CF53-F1C0-4CDD-9FDF-D1F61A10DE8A'
update [SharePoint_Config].[dbo].[SiteMap]
set id= '887E0ED3-9CDD-42EC-8A38-6D397349169B’
where ApplicationId=
'3B988D4F-4AD6-40F1-B7A8-8A4EBA9FC12D'
and id='0477CF53-F1C0-4CDD-9FDF-D1F61A10DE8A'
And Voila just like that the site was up.
Now I was able to move the data I needed and everyone is happy:-)
Friday, August 6, 2010
Subscribe to:
Posts (Atom)

