Home

Tuesday, June 05, 2007

SharePoint V2: Error: Upgrade Pre-Scan Error, Orphaned Site

Description:

During preparation for an upgrade to Microsoft Office SharePoint Server 2007, after running prescan.exe on a SharePoint Portal Server 2003 environment, the pre-upgrade report lists an error such as the one below.

06/04/2007 16:26:59 Error: Cannot get content database Id for SPSite: http://servername/sites/sitename
06/04/2007 16:26:59 Microsoft.SharePoint.SPException: There is no Web named "/sites/sitename". ---> System.Runtime.InteropServices.COMException (0x81070504): There is no Web named "/sites/sitename". at Microsoft.SharePoint.Library.SPRequestInternalClass.OpenSite(String bstrUrl, Boolean bGetUrlOnly, String& pbstrServerRelativeUrl, Guid& pgSiteId, Int32& pOwnerID, Int32& pSecondaryContactID, DateTime& pdtLastContentChange, DateTime& pdtLastSecurityChange) at Microsoft.SharePoint.Library.a.a(String A_0, Boolean A_1, String& A_2, Guid& A_3, Int32& A_4, Int32& A_5, DateTime& A_6, DateTime& A_7) --- End of inner exception stack trace --- at Microsoft.SharePoint.Library.a.a(String A_0, Boolean A_1, String& A_2, Guid& A_3, Int32& A_4, Int32& A_5, DateTime& A_6, DateTime& A_7) at Microsoft.SharePoint.SPSite.c() at Microsoft.SharePoint.SPSite.get_ID() at Microsoft.SharePoint.PreupgradeReport.Scan.GetContentDBBySite(SPSite site, SPVirtualServer vs)

Solution:

Windows SharePoint Services 2.0 and SharePoint Portal Server 2003 each have their own approach to cleaning up orphaned records. The KB articles below provide information on related hotfixes and explain how to use command line utilities to clean up corrupted databases.

Windows SharePoint Services 2.0
http://support.microsoft.com/kb/924881
http://support.microsoft.com/kb/918744
From: \program files\common files\microsoft shared\web server extensions\60\bin
To Detect: stsadm -o databaserepair -url http://ServerName -databasename DatabaseName
To Repair: stsadm -o databaserepair -url http://ServerName -databasename DatabaseName -deletecorruption

SharePoint Portal Server 2003
http://support.microsoft.com/kb/919175
http://support.microsoft.com/kb/918742
From: \programfiles\Sharepoint Portal Server\Bin
To Repair: spsadm repairorphans http://ServerName

1 comment:

JKK said...

I'm having the same issue, but running those commands does not reveal any orphaned sites.
I checked the sites and webs tables in sql and they don't appear there.
Any ideas?

Blog Archive

Followers