Orphanded Site objectes in MOSS 2007

At the client side I was asked to create a site using their legacy code. The code failed to create a new site and gave an error the “site already exists”. In the CA I was able to see the site in Site Collection List. However, I could not delete the site. The site had some orphaned objects.

Other diagnosis is, when I ran the following command

stsadm -o enumsites http://demo

I noticed in the output the good site listed correctly but the bad or corrupted site had an exception (as seen below).

  <Site Url=”http://demo/sites/VM” Owner=”EDLINK\psf” ContentDatabase=”WSS_CLIENTS” StorageUsedMB=”35034.6″ StorageWarningMB=”0″ StorageMaxMB=”0″ />
  <Site Error=”The system cannot find the path specified. (Exception from HRESULT: 0x80070003)” />
</Sites>

Did some search for above error/exception and noticed it is something to do with the Orphaned Site objects.

To resolve the problem, I had to attach and detach the content database. The details steps are following. I hope this helps resolving your problem.

— Check for no orphans… Note: you may or may not see the orphaned objects. I always noticed zero count for the problem.

STSADM -o preparetomove -ContentDB DEMO-SQL1:WSS_CLIENTS -site http://demo
— Prepare to move
— Look http://technet.microsoft.com/en-us/library/cc262122(v=office.12).aspx
STSADM -o preparetomove -ContentDB DEMO-SQL1:WSS_CLIENTS -site http://demo

— Dettach the content database
stsadm -o deletecontentdb -url http://demo -databasename WSS_CLIENTS -databaseserver DEMO-SQL1

— Attach content DB
stsadm -o addcontentdb -url http://demo -databasename WSS_CLIENTS -databaseserver DEMO-SQL1


— check for no orphans, if it was present before hopefully the count will be zero this time.
stsadm -o databaserepair -url http://demo -databasename WSS_CLIENTS


— UNDO Prepare to move
— Look http://technet.microsoft.com/en-us/library/cc262122(v=office.12).aspx
STSADM -o preparetomove -ContentDB DEMO-SQL1:WSS_CLIENTS -site http://demo -undo

Thanks,

-Pankaj Surti.

About Pankaj

I am a Developer and my linked profile is https://www.linkedin.com/in/pankajsurti/
This entry was posted in MOSS 2007, SharePoint, Technical Stuff. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s