Databaserepair: Stsadm operation (Office SharePoint Server)

From Stsadm

This Office product will reach end of support on October 10, 2017. To stay supported, you will need to upgrade. For more information, see , Resources to help you upgrade your Office 2007 servers and clients.

Description

Detects and removes orphaned items from content databases in Windows SharePoint Services. In some situations, a content database that is used by Windows SharePoint Services may become corrupted. The corrupted database may contain orphaned items. For example, a document may not have a parent document library or a list may not have a parent Windows SharePoint Services Web site. The databaserepair operation can detect and repair database corruption for only the following types of orphaned items in a content database:

  • A Windows SharePoint Services Web site that does not have a parent Windows SharePoint Services Web site

  • A subweb that does not have a parent Windows SharePoint Services Web site

  • A list that does not have a parent Windows SharePoint Services Web site

  • A document that does not have a parent document library

  • A list item that does not have a parent list

  • A Web page that does not have a parent Windows SharePoint Services Web site

  • Missing security scopes on Webs, lists and items

NoteNote:
This operation will not repair any other type of database corruption.

Syntax

stsadm -o databaserepair

   -url <url name>

   -databasename <database name>

   [-deletecorruption]

Parameters

Parameter name and short form Value Required? Description

url

A valid URL, such as http://server_name

Yes

The URL name of the Web application that is being repaired.

databasename (dn)

A valid database name, such as "DB1"

Yes

The name of the content database that is to be repaired.

deletecorruption

<none>

No

Removes corruption from a content database.

Examples

Detect an orphan site

To detect orphaned items, use the following syntax:

stsadm -o databaserepair -url http://<URL_of_WindowsSharePointServices_Site> -databasename <name of database that contains the orphan item>

Delete an orphan site

To delete orphaned items, use the following syntax:

stsadm -o databaserepair -url http://<URL_of_WindowsSharePointServices_Site> -databasename <name of database that contains the orphan item that is to be deleted> -deletecorruption