Saturday, January 24, 2009

Content Database Restore File Not Found

We recently experienced a rather weird experience when moving some SharePoint content databases. We are not using stsadmn. We have several environments, all the same, and we just wanted to move the content DB from one environment to another. We have done this several times with no error.

This time around when we did it, we were getting File Not Found errors when we try to go to the site. We went into Central Admin and the Content Database was listed on the Manage Content Databases page, however if you went to view the Site Collection list no information was listed. On the Site Collection page you should see things such as a URL, Title, some other stuff and a Database Name. All of this was blank. There were no exceptions in the Event Log on the box and no errors either in the SharePoint log.

We did some searching and could not find anything. Andy on my team found this posting. It had nothing to do with this error however we decided to give it a try. It does not actually delete the databases, it just removes the association between the MOSS site and the database.

Stsadm -o deletecontentdb -url [Site URL] -databasename [database name]

Stsadm -o addcontentdb -url [Site URL] -databasename [database name]

Once we did this, everything started running again.

References:

5 comments:

Joel Lam said...

you are god... It save my ass....

Joel Lam said...

you are god... It save my ass. Thanks

Jason Apergis said...

I live to serve.

Niwrad said...

You da' man! You saved my butt also -- that was wierd! I restored prod contenct to QA and all other sites were fine.. Other things I tried were crap and this was easy. Bravo! AND thanks for posting this, it is exactly what I saw and what I needed to fix..

shaikh said...

Thank you dear

It really very helping post and saves life of sharepoint developer.