Export (0) Print
Expand All

Enumallwebs: Stsadm operation (Windows SharePoint Services)

Office 2007

Updated: April 28, 2009

Applies To: Windows SharePoint Services 3.0

 

Topic Last Modified: 2009-04-15

Displays the IDs and site map status for all site collections and subsites in the content database.

For additional information about site map status, see the Remarks section.

NoteNote:
The enumallwebs operation was first introduced in Windows SharePoint Services 3.0 with Service Pack 2 (SP2).

stsadm -o enumallwebs

   -databasename <database name>

   [-databaseserver <database server name>]

 

Parameter name

Value

Required?

Description

databasename

A valid name, such as "DB1"

Yes

Specifies the name of the content database that contains the site collections and sites that should be shown.

databaseserver

A valid name of a server, such as "DS1"

No

Specifies the name of the database server instance hosting the content database that contains site collections and sites that should be displayed.

A site map contains site collections that are browsable and registered. Site collections that are not registered in the site map are commonly referred to as "orphaned" site collections.

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. The orphaned site collection data still exists, but you can only access it by detaching its content database from the current Web application, and then attaching it to a Web application that does not have a site collection registered at that URL path.

For additional information about detaching and attaching a content database, see Deletecontentdb: Stsadm operation (Windows SharePoint Services) and Addcontentdb: Stsadm operation (Windows SharePoint Services) respectively.

NoteNote:
This enumallwebs command can be used in combination with the Deletesite: Stsadm operation (Windows SharePoint Services)and Deleteweb: Stsadm operation (Windows SharePoint Services) operations to delete orphaned site collections and orphaned sites from a content database.

To display the site collections and sites in the content database called DS_Database, type the following syntax:

stsadm -o enumallwebs -databasename DS_Database

Output similar to the following should be displayed in a command-line window:

<Sites Count="2">
  <Site Id="e2a114b8-80c9-41f6-87bf-3feddf2ad9b6" OwnerLogin="Domain\username" InSiteMap="False"> 
    <Webs Count="1">
      <Web Id="064d8e7b-b349-4693-bd67-dcefed3bf466" Url="/sites/site_name" LanguageId="1033" TemplateName="STS#0" TemplateId="1" />
    </Webs>
  </Site>
  <Site Id="f440114b8-79d9-32f6-87bf-4geddf2ad9b6" OwnerLogin="Domain\username" InSiteMap="True" HostHeader="www.contoso.com">
    <Webs Count="1">
      <Web Id="12348e7b-c456-4693-bd67-efdegd3bf466" Url="/" LanguageId="1033" TemplateName="STS#0" TemplateId="1" />
    </Webs>
  </Site>
</Sites>

The relevant elements in this output are described as follows:

  • Sites: The number of site collections within the content database.

  • Count: The total number of site collections within the content database, regardless of whether they are in the site map.

  • Site: A site collection within the content database.

  • Id: The ID of the site collection.

  • OwnerLogin: The primary site collection owner.

  • InSiteMap: True if the site collection is accessible; False if the site collection is an orphan.

  • HostHeader: An attribute that only appears if this is a host-named site collection. The value is the host header of the site collection.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft