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.