Wednesday, 29 April 2015

Restore-SpSite : The operation that you are attempting to perform cannot be completed successfully

Recently I was asked to move a site collection from one farm to the other. No problem, piece of cake, right?
That what I thought and ran the command
SPSite-Restore …..After backing up. I have 20 site collection in the data base already and limit is set to 2000 but got this error
 Restore-SpSite : The operation that you are attempting to perform cannot be completed successfully. No content databases in the web application were available to store your site collection. The existing content databases may have reached the maximum number of site collections, or be set to read-only, or be offline, or may already contain a copy of this site collection. Create another content database for the Web application and then try the operation again 


Woo, I will never create a new data base for this, here is how I resolved this. Run the same command with additional parameters of “ Database name” & “Database Server”
E.g. Restore-SpSite URLGoesHere –Path **.bak -force –DatabaseServer ** -DatabaseName **
And it worked this time. Site was successfully restored.
In some cases if you are trying to restore or create a new site with the same url that was deleted some time ago, there are possibilities it has not been removed from the database permanently in that case try this.
Get-SPDeletedSite:

If the site exist with the same URL remove using
Remove-SPDletedSite –Identity
As shown in the image above. Once removed this site will be removed from database for ever permanently.

No comments:

Post a Comment