Enumallwebs: Stsadm operation (Office SharePoint Server)
Updated: April 28, 2009
Applies To: Office SharePoint Server 2007
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.
Topic Last Modified: 2015-03-09
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.
|The enumallwebs operation was first introduced in Microsoft Office SharePoint Server 2007 with Service Pack 2 (SP2).|
stsadm -o enumallwebs
-databasename <database name>
[-databaseserver <database server name>]
A valid name, such as "DB1"
Specifies the name of the content database that contains the site collections and sites that should be shown.
A valid name of a server, such as "DS1"
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 (Office SharePoint Server) and Addcontentdb: Stsadm operation (Office SharePoint Server) respectively.
|This enumallwebs command can be used in combination with the Deletesite: Stsadm operation (Office SharePoint Server)and Deleteweb: Stsadm operation (Office SharePoint Server) 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.