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
Restore-SpSite …..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 “ Databasename” & “DatabaseServer”
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.
If the site exist with the same URL remove using
As shown in the image above. Once removed this site will be removed from database for ever permanently.
Note: you may have to add the parameter -contentdatabase “[database name]” if you still get the error message.
Article from: https://sharepointumar.wordpress.com/2014/12/14/restore-spsite-the-operation-that-you-are-attempting-to-perform-cannot-be-completed-successfully/