Tuesday, May 28, 2013

Orphaned items in SharePoint Content Databases


היי חברים,

מבדיקה שערכתי בחווה גיליתי את השגיאה הבאה (מוקף באדום בצילום המצורף). אז על מה בעצם מדובר

אובייקט יתום אינו נגיש למשתמשים, אבל עדיין תופס מקום במסד נתונים. אובייקט יתום יכול לפעמים לגרום לשדרוג להיכשל.
למה הוא נקרא אובייקט יתום ולמה אכפת לי?
אובייקטים מיותמים נקראים כך בגלל שאין להם הורה שמכיל אותם כמו למשל מסמך שאין לו ספריית מסמכים שהוא מוכל בו , ובנוסף אין דרך להגיע לתוכן באמצעות ממשק המשתמש.


כדי לזהות פריטי יתומים, השתמש בשורת הפקודה הבאה:



כתוב את שורת הפקודה הבאה:
stsadm -o databaserepair -url http://SiteURL -databasename DatabaseName

הפלט יהיה רשימת פריטים יתומים בפורמט XML (בתוך ה-CommandLine) מומלץ להעתיק את התוכן לקובץ txt ולבדוק את הפריטים.



כדי למחוק פריטי יתומים, השתמש בשורת הפקודה הבאה:
stsadm -o databaserepair -url http://SiteURL -databasename DatabaseName

פרמטרים דרושים: URL, databasename

פרמטר אופציונליים: deletecorruption



בהצלחה!
רון נס.
============================================================================================================================================================================================

When I was checking farm issues I discovered the following error (attached photo red ringed). 
So what actually is: 

Orphan objects are not accessible to the users, but still takes up spaces in content database.
It sometimes causes upgrade to fail as well. Why do they call them orphans and why do I care?
They are orphaned objects because they no longer have a parent container, and there's no way to get to the content through the UI

This is from the Moinitoring Section in Central Admin


To detect orphaned items, use the following command line:


Write the following Command line : 
stsadm -o databaserepair -url http://SiteURL -databasename DatabaseName


The output will be a list of orphaned items in XML format (inside the commandline) it's recommended to copy the content to txt file and check the items.




To delete orphaned items, use the following command line:
stsadm -o databaserepair -url http://SiteURL -databasename DatabaseName -deletecorruption

Required parameters: url, databasename
Optional parameter: deletecorruption

Good Luck :)
Ron Ness.

No comments:

Post a Comment