My Techie Blog

  Home  |   Contact  |   Syndication    |   Login
  110 Posts | 5 Stories | 406 Comments | 0 Trackbacks

News

Archives

ADO.NET

Ajax

API/WebServices

ASP.NET Resources

BizTalk Server

Blogs I read

Free Books

How to

iOT

JavaScript

JQuery

JSLink - SharePoint

JSON

LINQ

Misc

Mobile BI

MS Business Inteliigence

Reporting Services

Responsive/MVC ASP.NET

SEO

Sharepoint Resources/Tools

SharePoint 2010 Branding

SharePoint 2010 Videos

SharePoint 2013

SharePoint Online

SilverLight

SPServices

SQL Server

Sql Server 2012

SSIS

Web Optimization Tools

Web Performace Tools

Windows 8

Windows Azure

Windows Azure

Windows Phone

WorkFlows

WSS V3

xml

Its interesting when you wonder why you can't restore your backed up sites when trying to restore a site using the stsadm and you keep getting error:

Cannot complete action . Please Try again

I will start by sending to Keith site which actually explains what orphan sites are and how you can avoid them.
Unfortunately in my own case there was nothing to avoid i guess the database just got corrupted
What i did was delete a site collection from the sharepoint Central Admin and that was it any time i try to restore to the site i deleted i get the error and when i try to create a site with the same name its tell me the site collection already exist and advices me to use another name.

And funny enough i can see still the site collection listed in the sitel collection list in my admin config

But the point is i never gave up and i WANT TO USE THE SAME SITE NAME

So  started digging into the stsadm cmd and i found a handy cmd called databaserepair which goes like like this below:

stsadm -o databaserepair -url http://MySharepointServer/sites/mySharepointSite -databasename YourdatabaseName

running the command above will list your sites and lists etc that are orphaned cool isn't it

and then when you use the  -deletecorruption
 
like bellow it will delete the corrupted data

stsadm -o databaserepair -url http://MySharepointServer/sites/mySharepointSite -databasename YourdatabaseName -deletecorruption

and you should see a similar  result in xml format with a deleted attribute that equals to YES

<OrphanedObjects Count="22">
  <Orphan Type="SPSite" Id="{E732BEEC-F4BD-40D7-A51F-7B33BA7D5698}" Deleted="Yes
" />

And i said to myself hmm... problem solved.

So i went back to the sharepoint Central Admin to create the site and bingo the error again

So as far as i know the only thing that worked for me if you check out Keith's blog  above is :

You need to basically remove and re-add the Content Database that the Configuration Database an entry for.  When the content database is removed from the virtual servers list of content databases, clean up logic is performed to remove the entries from the Configuration database.  You then simply re-add the content database back in, and the sites from the content database are re-added to the configuration database.

And that did the trick

You can also see more troubleshoting here
posted on Tuesday, May 20, 2008 7:24 PM

Feedback

# re: Error Cannot complete action when restoring a sharepoint site - possible cause : Orphaned site 8/8/2008 2:21 AM Milton Harper
I'm in the same boat you described above. We were restoring a site and hit Ctrl-C and ended up corrupting ourselves. I have run the database repair commands to remove the orphaned objects (now 0) but I still can't create a site with the same older name and I still see <Site Error="The system cannot find the path specified. (Exception from HRESULT: 0x80070003)"> when i run the enumsites command. I recall when we first started, we had to detach/attach the content db but don't recall the commands. I don't see them listed above. Could you post those.

# re: Error Cannot complete action when restoring a sharepoint site - possible cause : Orphaned site 1/14/2009 10:04 PM Peter Ekerot
I had the same problem. Running these commands fixed it:

stsadm -o deletecontentdb -url http://%COMPUTERNAME% -databasename WSS_Content

stsadm -o addcontentdb -url http://%COMPUTERNAME% -databasename WSS_Content


# re: Error Cannot complete action when restoring a sharepoint site - possible cause : Orphaned site 1/15/2009 10:55 AM Patrick
Peter,
Yeah and thanks for the cmd.I was supposed to post that earlier.But i mentioned it in the last statement of my post.
Thanks

# re: Error Cannot complete action when restoring a sharepoint site - possible cause : Orphaned site 2/25/2010 12:39 AM gbenga
Hello am new to this forum. I want to know how long the -deletecorruption command runs for?

Thanks

# re: Error Cannot complete action when restoring a sharepoint site - possible cause : Orphaned site 2/25/2010 12:50 AM gbenga
Hello am new to this forum. I want to know how long the -deletecorruption command runs for because the cmd has been running for quite sometime now?

Thanks

# re: Error Cannot complete action when restoring a sharepoint site - possible cause : Orphaned site 6/14/2010 11:09 AM Simon Carpentier
Thanks for the great post. I was afraid ending up playing directly in the SharePoint database.

@Peter: Thanks for the PS command.

@gbenga It is pretty long. I had 125 orphaned sites which took about 2 minutes to process.

# re: Error Cannot complete action when restoring a sharepoint site - possible cause : Orphaned site 8/11/2011 6:22 PM Greg Abbott
Same here. Simply ran the delete then add stsadm commands and I was able to clear out the failure regarding orphan sites in the PreUpgradeCheck report. Thanks!

# re: Error Cannot complete action when restoring a sharepoint site - possible cause : Orphaned site 1/24/2012 10:00 PM SimonG
I would like to thank you for the above advice you saved me so much pain and stress.

I was left with a corrupted db after a failed restore, all subsequent restores failed, I followed the steps above and its sorted, ran the restore and checked the site.


Post A Comment
Title:
Name:
Email:
Comment:
Verification: