Solved

Delete a site collection Sharepoint 2010

Posted on 2012-03-26
12
990 Views
Last Modified: 2012-04-12
We needed to move a couple of site collections under a different department as we've had a restructure of management at my business.
I found this pretty cool tool that will essentially run the STSADM commands in the background through a GUI-type interface.
However, it essentially copies the site from one location to the other so I need to delete the site collection from the old location.
I tried to do that by clicking on "delete this site collection" from the "Site Actions" area under "Site Settings" but I get an error.  When I try to delete the site collection, I get the error stating I couldn't delete the site if there were sub-sites. There is a calendar associated with this site collection that I believe is causing the above error.  When I click on the calendar link to get to that sub-site, I get an error that it can't find a file and the site won't even open (I've attached a screen print of the error)
The file it's looking for is a 3rd party add-on that was installed on our Sharepoint 2007 setup.  When we upgraded to Sharepoint 2010, this product hasn't been installed but apparently a remnant still exists.
Can anyone give a STSADM or POWERSHELL command that will delete that file remnant so I can delete the site I need to delete?  Am I going to have to install that 3rd party product just to be able to delete this site collection? (I hope not)
SharepointFileError.pdf
0
Comment
Question by:skbarnard
  • 5
  • 4
  • 3
12 Comments
 
LVL 15

Expert Comment

by:dp_expert
ID: 37769908
Have you tried to delete this site collection from central administration? I will allow you to delete entire site collection with subsites.
0
 
LVL 6

Expert Comment

by:martusha
ID: 37770826
stsadm -o deletesite -url http://servername/sites/sitename
0
 

Author Comment

by:skbarnard
ID: 37772948
I have tried to delete the site from Central admin, I get the message the site isn't found.
The site was copied to its new location under a different department so when I try to find it under the old department, it says "No site was found that begins with /Departments/DepartmentName/SubDepartment" (SubDepartment is the actual site collection I'm trying to delete - not the actual name)

I tried using the STSADM command above from martusha and I get the message "there is no top level web site named http://servername:port/site/sitename" (I filled in the appropriate information)  I tried the command with & without the port, got the same error each time

I need to move one other site collection from the discontinued site then I may be able to do what dp_expert suggested as there would then be no viable sub-sites under this department.

I'll report back - unless either of you can address the error message I recieve.
0
 

Author Comment

by:skbarnard
ID: 37773786
UPDATE ----
When I go to Central Admin, View all site collections - I'm unable to see all the site collections.
With our MOSS 2007 setup when I clicked on view all site collections, I could get a tree view and see top-level "portal", then see "departments" and under departments all sub-departments etc.  For instance Portal -> Departments -> BusinessOffice -> Insurance etc.
In the attached file, you can see what I see.  I've already chosen the top level site (Portal) and all I see then is the yellow area with the /.  So in the URL search area, I put the rest of the path (Departments/DeputySup/IS) and I get the error shown.
I even tried the whole URL http://portal.company.com/Departments/DeputySup/IS and get the same error message.
Any thoughts?
I can't backup the site through Central Admin because I can't see all of the site collections.
My system doesn't seem to recognize the backup command in STSADM.
I tried using the following PS command - it appears to need or want more information because as soon as I press return, I get a >> prompt
Backup-SPSite -Identity "http://TopLevelSite.company.com/Departments/NextLevel/CollectionWantToBackUp" -Path "C:\folder\filename" (this was entered on one line in PS, it was changed when typed into this message box)
SharepointError3-27.pdf
0
 
LVL 15

Expert Comment

by:dp_expert
ID: 37775287
Let me get this straight - you can acces the site by going to it with URL but cannot see it in the central admin?

Are you using correct web application? When you choose site collections you are give also a field (partly visible on your screenshot in the top right corner) to choose the web app.
0
 

Author Comment

by:skbarnard
ID: 37779516
I usually take the long way to get to the site by going to the portal home page then click on the department, then the site.
However, I just tried navigating to the site directly by typing in the whole URL and YES - I can navigate to the site directly in the browser but when I try to see it in Central Admin, the site isn't found.
I have selected the correct web app (our portal web app) and under that I should be able to see a list of all the subsites under that web app, right?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 6

Expert Comment

by:martusha
ID: 37780603
Under web application you should be able to see all available Site Collections (not subsites).
Maybe you want to delete a site, not a site collection?
0
 
LVL 15

Expert Comment

by:dp_expert
ID: 37780638
The view is being paged, so if you have a lot of site collections there might be some on other pages. But something struck me  - on the screenshot you have submitted you have only one site collection - the root one.

Are you sure you have multiple site collections? Because site collection is not just a set of sites but also an object in SharePoint.

If by site collection you mean a subsite and multiple subsites of this subsite, then this is not a site collection - just a collection of sites - and it's a very important distinction.

What do you see in the central admin when you go to "Application management" then "View all site collections" under the "Site collections" group? Only one entry with a "Slash" (first example on the attachment) or multiple entries (second example) ?
Many site collections and one site collection
If only one entry this means you have only one site collection. In this case go to the site you want to delete. There click "Site actions" and choose "Site settings" (you should get to http://portal.company.com/Departments/DeputySup/IS/_layoouts/settings.aspx) On the site settings page click "Sites and Workspaces" (should show you the "http://portal.company.com/Departments/DeputySup/IS/_layouts/mngsubwebs.aspx" page) - there you will be able to delete the subsites of the current site. Once this list is empty you will be able to delete this current site.
0
 

Author Comment

by:skbarnard
ID: 37782906
When I go to the proper web application (portal.comany.com), I see what you show in the top picture - one entry with a slash, but I should see what is pictured in your second picture.
I will eventually want to delete the site (martusha) but I continue to get the message
"Error deleting Web site "/Departments/DeputySup/Facilities". You can't delete a site that has subsites"
I get this error when I'm actually trying to delete the Facilities sub-site (site collection) that has already been copied to its new location.  That site collection has a calendar under "sites" that when I try to delete it, I get an error stating a file can't be found (from a 3rd party add-on that was part of our 2007 setup but never installed when we upgraded to 2010)  I get the error when I try to go to the facilities calendar page.  
In other words, I've tried everything that you mentioned, dp_expert but none of it has worked.
I've also tried "remove-spsite" PS command to no avail.
0
 
LVL 6

Accepted Solution

by:
martusha earned 500 total points
ID: 37794831
It was a big mistake to not delete 3rd party add-ons (unused) before migration...
Try to delete that calendar with sharepoint manager, you can download it here: http://spm.codeplex.com/
0
 

Author Closing Comment

by:skbarnard
ID: 37835210
Cool tool - it enabled me to delete the site (and find that the site was under multiple departments!)
0
 
LVL 6

Expert Comment

by:martusha
ID: 37836498
Yes, its really nice. Happy to hear that it helped you.
Thanks!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

I have just recently built a new SharePoint 2007 farm on a complete Windows 2008 R2 server platform and part of my standard build procedure is to implement a warm up routine, usually in the form of a script that is scheduled every morning to launch …
Pimping Sharepoint 2007 without Server-Side Code Part 1 One of my biggest frustrations with Sharepoint 2007 in the corporate world is that while good-intentioned managers lock down the more interesting capabilities of Sharepoint programming in…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now