first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

“Sharepoint Orphans Explained”; blogs.technet.com/corybu/

Orphans have been coined the name for objects in a SharePoint schema that live without a parent or child relationship in the database. In effect these database inconsistencies can be created due to many different reasons.

You can only detect orphans through SQL, there is no real out of the box way to detect them from the web UI.

Configuration Orphans: These are the orphans that reside in your configuration database but have no child counterpart (contentDB entry). Cleaning these are the easiest of all the orphans. Simply detach the content database from your farm that was included in the result set and reattach it. This will refresh the sitelist that is tied to that content database and will remove the stale entry.

Content Database Orphans: This is where it gets tricky.

There are 2 essential types of content database orphans.

Type 1 Scenario(reactive maintenance): Your site that has the content you need is not mapped to the configuration database but resides in a content database that is connected to the farm, additionally a blank new site is mapped to the configuration database. This would hold true to the second scenario explained above. To resolve this simply backup the site that is accessible, then delete it. Once done detach and reattach the database that contains the real site. This will remap the site to the configuration database. You now have access to a once orphaned site and all of your content is restored.

Type 2 Scenario(Planned Maintenance): The correct site is mapped to the configuration database, however you have stale orphans in other databases. Simply backup your production site and delete it. Once that completes detach and attach the database that contains the stale orphan, this will in effect map the orphan to the configuration database and render it accessible. You can then delete it using STSADM. Perform these steps until you have cleaned all orphans. Once all orphans are clean you can then restore your production site back into the farm. Viola, orphan free :)

Remind users that creating and deleting a site can be a sometimes several minute process. Regardless of how long it takes let the application finish what it is doing. If it times out then try again but never click back, stop, or close the window when performing these types of administration tasks. Network Latency, Web front end performance and SQL backend performance can all attribute to a slow create or delete statement. Be patient :).

[http://blogs.technet.com/corybu/archive/2007/05/31/sharepoint-orphans-explained.aspx]

mod date: 2008-12-02T22:23:22.000Z