When you try to restore a site collection backup using stsadm, you may encounter the error
“The site collection could not be restored. If this problem persists, please make sure the content databases are available and have sufficient free space.”
Few of the times its true that you may not have sufficient space in DB but, not all the times. If you are having space issue here is the kbarticle. When I landed up with the same error i tried
- Checking my DB and found GB’s of space is available.
- Checked in the central admin where my web application is having an entry for the site collection I restored. But when I tried to open the site in browser, OOPS!!! “Page not found error”.
- Tried to delete the site in central admin but 😦
- Tried to do so using stsadm. Again error “Cannot complete this action. Please try again later”
When digged I found there is an orphan entry created for my site. Some links on what is orphan entry & how its created. Inshort orphans have been coined the name for objects in a SharePoint schema that live without a parent or child relationship in the database.So you are having an entry in your content DB for the site you tried to restore. So what is the solution?
Remove the orphaned entry in the content database. This needs changes in the web application’s content database which has to be dealt with care if its a production server. We are working on that with the support of Microsoft & hope i will be posting the details soon.
One workaround for this is creating a new content DB for your web application & restoring the site in it. To do so
- Go to the central admin and create a new web application(Temporary web appln whose content DB we will use).
- Now got to Application Management > Content Databases and select the newly created web application.
- The content DB you created will be displayed. Click on it.
- In the Manage Content Database Settings page & detach the content DB by selecting Remove content database. Don’t forget to note the name of this content DB which we will be using it further. At this point of time your newly created web application will not be having the content DB associated with it.
- Now we have to attach this content DB to your web application which has an orphaned entry.
- So go to Application Management > Content Databases and select the web application which displays its available content DB’s.
- Click on Add a content database & in the Database Name text box give the name which we have noted in step 4 and complete the process.
- Now in the Manage Content Base you will be able to see the new content DB along with the old ones.
- Now we have to restore our site in this newly created content DB.
- But while restoring the site there may be a chance that the site going into the old content DB’s which is having the orphaned entry which results in same error.
- So in the Manage Content Base section for each content DB you can see the “Current Number of Sites” count displayed. Click on the DB and set the “Maximum Number of Sites” to this value.
- The above step makes no new site to be created in the old content Db and hence once you restore the site, it will created in our new content DB.
- That’s it and now you can restore the site.
- Now you can revert the values for “Maximum Number of Sites” we have changed in step 11.