Share via


Spsearch: Stsadm operation (Windows SharePoint Services)

Applies To: Windows SharePoint Services 3.0

 

Topic Last Modified: 2008-06-26

Operation name: Spsearch

Description

Manages the Windows SharePoint Services Search service.

Syntax

stsadm -o spsearch

**\[-action\]**

**\[-f\]**

**\[-farmperformancelevel\] \<indexing performance\>**

**\[-farmserviceaccount\] \<domain\\name\> (service credentials)**

**\[-farmservicepassword\] \<password\>**

**\[-farmcontentaccessaccount\] \<domain\\name\>**

**\[-farmcontentaccesspassword\] \<password\>**

**\[-indexlocation\] \<new index location\>**

**\[-databaseserver\] \<server\\instance\>**

**\[-databasename\] \<database name\>**

**\[-sqlauthlogin\] \<SQL authenticated database user\>**

**\[-sqlauthpassword\] \<password\>**

Parameters

Parameter (short name)

Value

Required?

Description

action

Any one of the following values:

  • List

  • Start

  • Stop

  • Attachcontentdatabase

  • Detachcontentdatabase

  • Fullcrawlstart

  • Fullcrawlstop

Yes

Specifies the action to perform. The required parameters for "start" (if not already set) are farmserviceaccount and farmservicepassword.

f

<none>

Suppresses prompts. Used with the -action parameter.

farmperformancelevel

Any one of the following values:

  • Reduced

  • PartlyReduced

  • Maximum

Adjusts the indexing performance level for each index server. The default setting is Reduced.

farmserviceaccount

<none>

No

The user name for the account under which the Windows SharePoint Services Search service account will run.

farmservicepassword

<none>

No

The password for the -farmserviceaccount parameter.

farmcontentaccessaccount

<none>

No

Account to use as the default account when you crawl content. This account must have read access to the content being crawled.

To avoid crawling unpublished versions of documents, make sure that this account is not an administrator on the target server.

farmcontentaccesspassword

<none>

No

The password for the -farmcontentaccessaccount parameter.

indexlocation

A valid folder location in the form: C:\Folder\Subfolder

No

Configures the search server that has the location of where the index resides.

databaseserver (ds)

A valid database server, such as "Database1"

No

Sets the database server to the Search database.

Note

Use of Windows authentication is strongly recommended. To use SQL authentication, specify the credentials that will be used to connect to the database by using the -sqlauthlogin and -sqlauthpassword parameters.

databasename (dn)

A valid database name, such as "Databasename1"

No

Sets the database name to the Search database.

Note

Use of Windows authentication is strongly recommended. To use SQL authentication, specify the credentials that will be used to connect to the database by using the -sqlauthlogin and -sqlauthpassword parameters.

sqlauthlogin

<none>

No

When this parameter is enabled, SQL authentication is used instead of Windows authentication. This parameter specifies the SQL user name.

sqlauthpassword

<none>

No

When this parameter is enabled, SQL authentication is used instead of Windows authentication. This parameter specifies the SQL password.

Examples

The following examples include all the available values of the -action parameter.

List of current settings

To obtain a list of all the current Windows SharePoint Services Search service (Spsearch) settings, use the following syntax:

Stsadm -o spsearch -action list

Start or stop the service

To start the Windows SharePoint Services Search service (Spsearch), use the following syntax:

stsadm -o spsearch -action start

**   -farmserviceaccount <domain\name> (service credentials)**

**\[-farmservicepassword\] \<password\>**

To stop the Windows SharePoint Services Search service (Spsearch) and to remove all index files for a particular search server, use the following syntax:

stsadm -o spsearch -action stop [-f]

Important

When this parameter is used, the following warning message is displayed: "Warning: The Windows SharePoint Services Search service that was enabled on this server will be uninstalled and all index files will be deleted. Are you sure you want to permanently delete all data in the index? [y/n]" To suppress this warning message, you can use the f parameter.

Attach or detach a database

To attach to a specific content database, use the following syntax:

Stsadm -o spsearch -action attachcontentdatabase -databasename <content database name> [-databaseserver <server\instance>] [-searchserver <search server name>]

Note

The databaseserver and searchserver values are optional.

Important

If you detach and reattach a content database, be aware that the next time the content within that content database is crawled a full crawl will occur even if an incremental crawl has been requested. Because a full crawl re-crawls all content that the crawler encounters, regardless of whether that content has been previously crawled, full crawls can take significantly more time to complete than incremental crawls.

To detach from a specific content database, use the following syntax:

Stsadm -o spsearch -action detachcontentdatabase -databasename <content database name> [-databaseserver <server\instance] [-f]

Note

The databaseserver value is optional. To suppress the warning message, you can use the -f value.

Start or stop a full crawl

To start a full crawl of the content, use the following syntax:

Stsadm -o spsearch -action fullcrawlstart

To stop a full crawl of the content, use the following syntax:

Stsadm -o spsearch -action fullcrawlstop

Remarks

If you are running the Infrastructure Update for Windows SharePoint Services 3.0, the identifier (ID) of each content database is retained when you restore or reattach the database by using built-in tools. Default change log retention behavior when using built-in tools is as follows:

  • The change logs for all databases are retained when you restore a farm.

  • The change log for a content database is retained when you reattach the database.

  • The change log for a content database is NOT retained when you restore just the content database.

When a database ID and change log are retained, Search continues crawling based on the regular schedule defined by crawl rules. When a change log is not retained, Search performs a full crawl during the next scheduled crawl. For more information, see Move content databases (Windows SharePoint Services 3.0) and Back up and restore the entire farm (Windows SharePoint Services 3.0 technology).