SiteCollection URL still exists after deletion of Site Collection
Hi,
I deleted a site collection accidentally from brower (http://site/_layouts/deleteweb.aspx) using this page.
Now I wanted to get that site colleciton back. I know, I can restore that database to a new site collection, but I can still see that site collection URL in the Site Collection list of CA site so that I can't create new site collection with same name and
URL. When I was trying to delete from CA that delete button was disabling as soon as I select that Site collection.
I tried databaserepair, stsadm cmds none of them worked. Can anybody please help me out how to delete that site collection permanently so that I can create a new site collection with the same name and URL.Thanks, Hitchs
July 19th, 2012 7:49pm
The page you provided, deleteweb.aspx deletes sites and not site collections. You have deleted the root site for the site collection, but not the site collection itself. You will need to delete the site collection from Central Administration (in Application
Management) or with the
Remove-SPSite cmdlet
Jason Warren
Infrastructure Specialist
Habanero Consulting Group
habaneroconsulting.com/blog
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2012 8:27pm
Hi Jason,
Thanks for your reply.
I tried that cmdlet and also from Central Admin, but none of them worked. when I select that Site collection from CA the delete button is greyed out and also it is not showing any properties which it supposed to show on the right side.Thanks, Hitchs
July 20th, 2012 12:56am
Can you retrieve the site collection with the
Get-SPSite cmdlet?
$site = Get-SPSite http://sitecollectionurl
$site
If so, you can try to delete it with the
SPSite.Delete() method:
$site.Delete()
If that still doesn't work, I see two options.
If the site collection is the only site collection in the content database,
detach the content database and delete the content database from SQL Server. Add a new content database to the web application and recreate your site collection.If you can get the site collection, display its GUID:
$site.Id
With this GUID, you can use the undocumented
deleteconfigurationobject stsadm operation:
stsadm -o deleteconfigurationobject -id GUID
Jason Warren
Infrastructure Specialist
Habanero Consulting Group
habaneroconsulting.com/blog
Free Windows Admin Tool Kit Click here and download it now
July 23rd, 2012 2:30pm
SharePoint 2010 have a good feature that a deleted site collection can be restores with any help of database restore.
If you have the GUID of that site then site can be restored through powershell command.
If you want to create a new site collection name through central admin and teh site still exists then please delete the site GUID's reference.
You can get the site GUID through the following commands:
$site = Get-SPSite http://yourserver/sites/yoursite
$web = $site.OpenWeb("yoursubsite")
write-host "Site: " + $site.id
write-host "Web: " + $web.id
$web.lists | Format-Table title,id -AutoSize
$web.Dispose()
$site.Dispose()
or follow the link
http://technet.microsoft.com/en-us/library/ff607950.aspx
July 23rd, 2012 2:47pm
Hi Jason and Santhosh,
But my farm is on MOSS 2007? is that commands still works on 2007?Thanks, Hitchs
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2012 1:04pm
If you have the SharePoint 2007 farm then detach and attach db stsadm command would be useful for you.
Please do not use Central admin to detach and attach the content db.
July 24th, 2012 1:21pm
But my farm is on MOSS 2007? is that commands still works on 2007?
Hi Hitchs,
No, these SharePoint 2010 cmdlets will not work with SharePoint 2007. This is a SharePoint 2010 forum so we assumed you have a SharePoint 2010 farm. It looks like the original post has been flagged so eventually a moderator will move it to the appropriate
forum (likely SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010)).
For SharePoint 2007 you can try detaching and reattaching as Santosh has said (using
stsadm -o deletecontentdb [don't worry, this doesn't actually delete the content database from SQL Server] and
stsadm -o addcontentdb) or you can also try
stsadm -o deletesite to delete the site collection.
If that still doesn't work, use check out
KB 2410139 to get the GUID of the site collection and use the deleteconfigurationobject operation I mentioned previously:
stsadm -o deleteconfigurationobject -id GUID
Jason Warren
Infrastructure Specialist
Habanero Consulting Group
habaneroconsulting.com/blog
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2012 2:28pm