Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How do I delete this screwey site?

  Asked By: Grace    Date: Jul 15    Category: Sharepoint    Views: 952

I have custom site definitions for SPS and WSS sites that run within
my portal. When I was creating a new 'site', I accidentally picked
the SPS template. Needless to say, I got a catastrophic error.

"No worries", I thought, "I'll just delete the site and reprovision
it." No such luck. I deleted it from the Sites list, but the URL is
still taken up by this phantom site. I tried purging it from
the 'TSPortal1_SITE' database manually, but I still can't create a
site with the URL I originally used on this orphan.

Any one have a tip on how I can get rid of this catastrophic failure
of a site?

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Keenan Whitehead     Answered On: Jul 15

OK, I resolved the problem. I didn't realize that I also needed to
find the site  and delete  it from the Config DB.

In case it helps anyone else, here are the steps I used. (Please
correct me where I am wrong or, better still, post a link to a tool
that makes this easier.)
-------------------------------------------------------
1) Connect to the right content database  (ex: TSPortal1_SITE)
2) "SELECT * FROM Sites" and get the ID guid.
3) Paste the Guid into the @SiteID assignment and run  this procedure.

Declare @SiteID varchar(100)
Declare @WebID varchar(100)

SET @SiteID = '89C11131-368F-4F9F-AF02-005BF01E474E'

begin tran
BEGIN TRY
SELECT @WebID = ID FROM Webs WHERE SiteID = @SiteID

DELETE FROM WebGroups WHERE SiteID = @SiteID AND WebID =
@WebID
-- DELETE FROM ComMd WHERE SiteID = @SiteID --Dunno if we
need to do this one.
DELETE FROM Deps WHERE SiteID = @SiteID
DELETE FROM Docs WHERE SiteID = @SiteID
DELETE FROM DocVersions WHERE SiteID = @SiteID
DELETE FROM EventCache WHERE SiteID = @SiteID
DELETE FROM EventLog WHERE SiteID = @SiteID
DELETE FROM HT_Cache WHERE SiteID = @SiteID
DELETE FROM ImmedSubscriptions WHERE SiteID = @SiteID AND
WebID = @WebID
DELETE FROM Links WHERE SiteID = @SiteID
DELETE FROM Lists WHERE tp_WebId = @WebID
DELETE FROM NavNodes WHERE SiteID = @SiteID AND WebID =
@WebID
DELETE FROM Personalization WHERE tp_SiteID = @SiteID
DELETE FROM SchedSubscriptions WHERE SiteID = @SiteID AND
WebID = @WebID
DELETE FROM SiteGroupMembership WHERE SiteID = @SiteID
DELETE FROM SiteGroups WHERE SiteID = @SiteID
DELETE FROM UserData where tp_SiteID = @SiteID
DELETE FROM UserInfo where tp_SiteID = @SiteID
DELETE FROM WebCat WHERE WebID = @WebID
DELETE FROM WebGroupMembership WHERE WebID = @WebID
DELETE FROM WebGroups WHERE SiteID = @SiteID AND WebID =
@WebID
DELETE FROM WebMembers WHERE WebID = @WebID
DELETE FROM WebParts WHERE tp_SiteID = @SiteID

DELETE FROM Webs WHERE ID = @WebID
DELETE FROM Sites WHERE ID = @SiteID

COMMIT
END TRY
BEGIN CATCH
Print 'Error Deleting the Site.'

IF @@TRANCOUNT > 0
ROLLBACK

-- Raise an error  with the details of the exception
DECLARE @ErrMsg nvarchar(4000), @ErrSeverity int
SELECT @ErrMsg = ERROR_MESSAGE(), @ErrSeverity =
ERROR_SEVERITY()
RAISERROR(@ErrMsg, @ErrSeverity, 1)
END CATCH

4) You will then need to connect to the server config DB (EX:
SPS01_Config_db) and run this SQL, again pasting the GUID of the
SiteID to delete.
DELETE FROM Sites WHERE SiteID = 'D5C9C089-BA32-4627-AF80-
4533C78964B7';

 
Answer #2    Answered By: Gopal Jamakhandi     Answered On: Jul 15

There is also a registry entry for every Virtual Server created:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server
Extensions\Ports\Port /LM/W3SVC/*

 
Answer #3    Answered By: Dameon Dejesus     Answered On: Jul 15

Another great tool for every SharePoint Admin is the metabase explorer which is contained in the IIS 6.0 Resource Toolkit...

 
Answer #4    Answered By: Tejaswani Barve     Answered On: Jul 15

Were you creating  a site, a site  collection, or a site at the root of an IIS web site?

 
Didn't find what you were looking for? Find more on How do I delete this screwey site? Or get search suggestion and latest updates.




Tagged: