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

Sharepoint Powershell exception while restoring a site collection :

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.


This is because even though you delete a site collection from CA. It will be deleted from the content database from front end. But logically that site collection still be there in database. This can be restored from Recycle bin but not able to do further migrations.

Please execute Get-SPDeletedSite command from PowerShell it will list all the site collections deleted from CA like the below report :

WebApplicationId   : GUID
DatabaseId         : Database GUID
SiteSubscriptionId : 00000000-0000-0000-0000-000000000000
SiteId             : Site Guid
Path               : site collection url
DeletionTime       : time stamp.

So once you get the ID execute the following command Remove-SPDeletedSite –Identity SiteGuid

and then go back to your sharepoint  Central administration > Monitoring > Job definitions and run the “Gradual Site Delete” job for the web application where you are trying to restore the site collection.

After that wait some time (depends on the size of your site collection) and try to restore site collection again. This time it should work without problems.

Leave a Reply

Your email address will not be published. Required fields are marked *