1 / 17

Methods and Solutions for Dealing with Orphaned Sites in a Large Scale SharePoint Environment

Methods and Solutions for Dealing with Orphaned Sites in a Large Scale SharePoint Environment. You too can be one step closer to having a clean, pristine SharePoint environment!. Jason Meaden IT Engineer, PNNL Collaboration Tools and Services. PNNL-SA-66367 . Introduction – Our Environment.

ravi
Download Presentation

Methods and Solutions for Dealing with Orphaned Sites in a Large Scale SharePoint Environment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Methods and Solutions for Dealing with Orphaned Sites in a Large Scale SharePoint Environment You too can be one step closer to having a clean, pristine SharePoint environment! Jason Meaden IT Engineer, PNNL Collaboration Tools and Services PNNL-SA-66367

  2. Introduction – Our Environment • Started out with WSS 2.0 • Over 750 sites within the first year • Both an internal and an external environment • Current site count: Over 3200 sites and subsites within our environment • Several very large custom web applications and portals, each with custom webparts, solutions, and tools • About 2 TB of data

  3. Introduction – Our Environment Web Front Web Front Web Front App Server Index Server SQL Internal

  4. Introduction – Our Environment SharePoint Server SQL External

  5. Orphaned Sites – What Are They? Orphaned objects are sites and/or site collections that don’t have corresponding entries in the configuration database. The orphaned site collection data still exists, but the only way to access it is by detaching its content database from the current web application, and then attaching it to a different web application (one that doesn’t have a site collection registered at that URL path.)

  6. Orphaned Sites – Where Do They Come From? From Microsoft: “Site collections typically become orphaned when they are in a content database that is being attached to a Web application, but the Web application already contains a site collection with the same Uniform Resource Locator (URL) path. Because site collections cannot share the same URL path in a Web application, only the first site collection registered in the site map will be accessible. All other site collections that use the same URL path cannot be registered in the site map and are considered orphans.”

  7. Orphaned Sites – How Can You Tell If You Have Them? Signs to watch for: • You run the STSADM –o deletesite command and it fails with the error “This site does not exist” • You run the STSADM –o restore command and it fails with a “0x80040E2F” error • Error messages on the server • By running a SQL query

  8. Orphaned Sites – Things Not To Do Never, ever, under any circumstance, directly edit any of your SharePoint databases. Do not manually update records Do not manually insert records Do not manually delete records Don’t do it. Ever.

  9. Orphaned Sites – Cleanin’ Em Up The “Old School” Way (Painful.) • Grab the SQL code from here: http://blogs.technet.com/corybu/archive/2007/05/31/sharepoint-orphans-explained.aspx • Open Microsoft SQL Server Management Studio • Open up the query, and configure the variables for your environment • Execute, and view the results

  10. Orphaned Sites – Cleanin’ Em Up The “Old School” Way (Painful.) Use this method if you don’t have SP2 installed • Configuration Database Orphans (“Easy” Ones) • Notify users (perform during an outage window) • Remove Configuration Database • Add the Configuration Database • You can use either Central Administration or Stsadm.exe

  11. Orphaned Sites – Cleanin’ Em Up The “Old School” Way (Painful.) • Content Database Orphans (The Not Easy one.) • Ensure that you have a complete and full backup of *everything* • Notify users (again, outage window) • Determine if the orphaned sites are accessible or not • If they are, make a backup of each of them with the STSADM –o backup command • Delete the sites with the STSADM –o deletesite command • Detach and re-attach the database

  12. Orphaned Sites – Cleanin’ Em Up The “Old School” Way (Cont.) • After re-attaching the database, attempt to find the site again • If you find it, delete the site, and detach / re-attach the database. • Repeat, until you can’t find the orphaned site any more.

  13. Orphaned Sites – Cleanin’ Em Up The “Old School” Way (Cont.) • Restore all of the backed up sites using the STSADM –o restore command • Run the FindOrphans SQL query again – cross your fingers that all of the orphaned sites are gone • If they are? You’re done! • If they aren’t, time to start from the beginning.

  14. Orphaned Sites – Cleanin’ Em Up The “New School” Way (Slightly less painful. Hopefully.) Use this method if you’ve installed SP2 • http://technet.microsoft.com/en-us/library/cc261873.aspx • To delete an orphaned site collection named "http://server_name/sites/site_name", perform the following steps: • Use the STSADM –o enumallwebs operation to find the site whose URL matches "/sites/site_name“, and look for the inSiteMap attribute among the information returned

  15. Orphaned Sites – Cleanin’ Em Up The “New School”Way • Look for sites with an InSiteMap attribute that has a value equal to “False.” This means the site is orphaned. • Use the value of the Id attribute from the matching Site tag and use it as the value of the siteid parameter of the deletesite operation. • For example: stsadm -o deletesite -force -siteid e2a114b8-80c9-41f6-87bf-3feddf2ad9b6 -databaseserver DS1 -databasename DB1 • Perform this for each orphaned site

  16. Summary: • Use the old method if you don’t have SP2 installed • Make sure to use the “prepare to move” command before removing databases if you don’t have the Infrastructure Update installed • After you’ve installed SP2, use the new method. Orphaned sites will happen to everyone – but with a bit of patience and knowledge they can be taken care of without too much difficulty!

  17. Questions? Comments? e-mail: jason.meaden@pnl.gov

More Related