Microsoft KB Archive/918742

= Description of a new command-line operation that is available for the Stsadm.exe command line tool that you can use to clean up orphaned items in the configuration database in SharePoint Portal Server 2003 =

Article ID: 918742

Article Last Modified on 12/18/2007

-

APPLIES TO


 * Microsoft Office SharePoint Portal Server 2003

-





INTRODUCTION
This article describes a new functionality in Microsoft Office SharePoint Portal Server 2003 that lets you clean up orphaned items in the configuration database. In certain scenarios, the configuration database may contain orphaned items. This article describes a new repairorphans command-line operation that is available for use with the Stsadm.exe command-line tool. You can use with the Stsadm.exe command-line tool with the repairorphans operation to clean up orphaned items in the configuration database.

The repairorphans operation removes, and then re-adds the _SITE content database. By doing this, orphaned items that may exist for the _SITE content database are removed from the configuration database.

In scenarios where a content database in Microsoft Windows SharePoint Services becomes corrupted, you may have to use the Stsadm.exe command-line tool to detect, and then delete orphaned items. After you use the Stsadm.exe command-line tool to repair content databases in Windows SharePoint Services, use the procedure that is described in this article to clean up orphaned items that may be present in the configuration database in SharePoint Portal Server 2003.



MORE INFORMATION
This problem was first fixed in a hotfix that is now contained in a service pack. If you installed the latest SharePoint Portal Server 2003 service pack, you do not have to install the hotfix.

Service pack information
This problem is corrected in SharePoint Portal Server 2003 Service Pack 3. To resolve this problem, obtain the latest service pack for SharePoint Portal Server 2003. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

889380 How to obtain the latest service pack for SharePoint Portal Server 2003

How to obtain the hotfix
This issue is fixed in the SharePoint Portal Server 2003 post-Service Pack 2 Hotfix Package that is dated May 30, 2006. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

918741 Description of the SharePoint Portal Server 2003 post-Service Pack 2 hotfix package: May 30, 2006

Information about the hotfix
The hotfix adds a new repairorphans command-line operation that you can use with the Stsadm.exe command-line tool to clean up orphaned items in the configuration database. The repairorphans operation uses the   parameter. The  placeholder is the Uniform Resource Identifier (URI) of the portal site.

The syntax that the Stsadm.exe command-line tool and the repairorphans operation use is as follows:

stsadm repairorphans 

How to clean up orphaned items in SharePoint Portal Server 2003
To use the Stsadm.exe command-line tool with the repairorphans operation to clean up orphaned items in the configuration database, follow these steps:  Click Start, click Run, type cmd in the Open box, and then click OK. Type the following line at the command prompt. , and then press ENTER:

cd /d %programfiles%\Sharepoint Portal Server\Bin

 Type the following line at the command prompt, and then press ENTER:

stsadm repairorphans

For example, if the URI of the portal site is http://Server1, type the following line at the command prompt, and then press ENTER:

stsadm repairorphans http://Server1



Important Do not run the &quot;stsadm repairorphans&quot; command against a live portal farm that is not fully quiesced. When you run the Repairorphans tool on a portal farm, the following behavior is true:
 * The portal farm cannot be accessed by users.
 * The portal farm cannot be backed up by SQL or other backup software on either the SharePoint side or the SQL side of the farm.
 * The portal farm cannot have external OM code running during the complete operation of the &quot;repairorphans&quot; command.

You must configure the SharePoint Portal Server so that users cannot author against it or add content. You must also set the server to read only. For more information about how to do this, visit the following Web site to obtain the SharePoint Portal Server 2003 Administrator's Guide:

http://www.microsoft.com/downloads/details.aspx?familyid=47405143-F586-4941-92F5-048BF00CF332&displaylang=en&displaylang=en



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.This problem was first corrected in SharePoint Portal Server 2003 Service Pack 3.

