• This email address is being protected from spambots. You need JavaScript enabled to view it.

    Recent items


Luca Costante - Items filtered by date: September 2015
Friday, 25 September 2015 09:40

ContentDataBase deletion error


if you're trying to remove a ContentDataBase following these steps

  • Remove the ContentDataBase from the Central Administration
  • Inside SQL, the DB is not removed. If you try to delete it (right click on the DB name and click on delete button) yuo will receive a SQL error (615 in my case)

and not works, try to execute the following SQL Commands, it works for me

Show/Hidden sql code

View source
USE master
ALTER DATABASE [databasename]
 ALTER DATABASE [databasename] SET emergency 
DROP DATABASE [databasename]


Published in SharePoint
Friday, 25 September 2015 07:56

Error during Restore-SPSite

Good morning,

I would describe a strange situation (never appeared before).

I was in a situation where in my web applications there was a series of wrong actions with backup of the ContentDB and site collection. The idea is to clean the situation making a Backup-SPSite of the site colleciton that I need, remove all site collection not used or that are wrong, create a new one and restore the backup.

All seems to proceed correctly until i should execute Restore-SPSite command. I press enter and:

"Restore-SPSite : No content databases are available for this operation but the site collection is scheduled for deletion in at least one content database.  Either wait for the deletion operation to complete or create a content database, and then try the operation again. To create a content database, click "Content databases" on the Application Management page, select the Web application to use, and then click "Add a content database"."

After some searches, I found the solution:

  1. Get-SPDeletedSite (to view the list of the sitecollections that were not removed correctly)
  2. Remove-SPDeletedSite -Identity <GUID> (to remove the site collection listed with the previous command
  3. Get-SPDeletedSite (to check that everything is clean)
  4. Run Gradual Site Deletion Timer Job (waiting the ending)
  5. FINALLY: Restore with PS!
Published in SharePoint