Thursday, May 15, 2014

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

While trying to restore a site collection, with "Restore-SPSite" cmdlet in PowerShell, 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.

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

Root cause and solution:
  • If you try to backup - restore a site collection on SAME content database, you'll end-up with this error.
    Solution: Create a new content database and restore your backup to the specific content database.
    Restore-SPSite http://intranet.crescent.com/sites/sales -Path D:\Backup\sales.bak -DatabaseServer SP13SQL -DatabaseName SP13_Sales_Content 
  • If you are tyring to  overwrite an existing site collection, use: -force parameter with Restore-SPSite or the -overwrite parameter with stsadm -o restore
  • You backup a site collection  - Deleted the site collection - Trying to Restore the backup? Well, in SharePoint 2010 SP1 onwards, deleted site collections still lives in the content database to be able to recover. Use: Get-SPDeletedSite to get the GUIDs of deleted site collections and completely remove the site collection from the database using: Remove-SPDeletedSite -Identity "SiteGuid"
  • If you are trying to Delete and Re-Create a site collection, make sure its permanently deleted with "Remove-SPDeletedSite" cmdlet and Trigger “Gradual Site Delete” job from Central administration > Monitoring > Job definitions.



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...