Share via


Spsearch:Stsadm 作業 (Windows SharePoint Services)

作業名稱:Spsearch

描述

管理 Windows SharePoint Services 搜尋服務。

語法

stsadm -o spsearch

[-action]

[-f]

[-farmperformancelevel] <索引編製效能>

[-farmserviceaccount] <網域\名稱> (服務認證)

[-farmservicepassword] <密碼>

[-farmcontentaccessaccount] <網域\名稱>

[-farmcontentaccesspassword] <密碼>

[-indexlocation] <新索引位置>

[-databaseserver] <伺服器\執行個體>

[-databasename] <資料庫名稱>

[-sqlauthlogin] <SQL 驗證的資料庫使用者>

[-sqlauthpassword] <密碼>

參數

參數 (簡稱)

必要?

描述

action

下列任一值:

  • List

  • Start

  • Stop

  • Attachcontentdatabase

  • Detachcontentdatabase

  • Fullcrawlstart

  • Fullcrawlstop

指定要執行的動作。用於 "start" (若尚未設定) 的必要參數為 farmserviceaccountfarmservicepassword

f

<無>

隱藏提示。搭配 -action 參數使用。

farmperformancelevel

下列任一值:

  • Reduced

  • PartlyReduced

  • Maximum

為各索引伺服器調整索引效能層級。預設值為 Reduced。

farmserviceaccount

<無>

在 Windows SharePoint Services 搜尋服務帳戶執行下的帳戶使用者名稱。

farmservicepassword

<無>

-farmserviceaccount 參數的密碼。

farmcontentaccessaccount

<無>

當您編目內容時,用為預設帳戶的帳戶。此帳戶必須擁有要編目內容的讀取權限。

若要避免編目未發佈的文件版本,請確定此帳戶不是目標伺服器的管理員。

farmcontentaccesspassword

<無>

-farmcontentaccessaccount 參數的密碼。

indexlocation

有效的資料夾位置格式為:C:\*資料夾*\*子資料夾*

設定有索引所在位置的搜尋伺服器。

databaseserver (ds)

有效的資料庫伺服器,例如 "Database1"

將資料庫伺服器設為搜尋資料庫。

注意

強烈建議使用 Windows 驗證。若要使用 SQL 驗證,請使用 -sqlauthlogin-sqlauthpassword 參數指定連線到資料庫所要使用的認證。

databasename (dn)

有效的資料庫名稱,例如 "Databasename1"

將資料庫名稱設為搜尋資料庫。

注意

強烈建議使用 Windows 驗證。若要使用 SQL 驗證,請使用 -sqlauthlogin-sqlauthpassword 參數指定連線到資料庫所要使用的認證。

sqlauthlogin

<無>

啟用此參數時,會使用 SQL 驗證,而不使用 Windows 驗證。此參數指定 SQL 使用者名稱。

sqlauthpassword

<無>

啟用此參數時,會使用 SQL 驗證,而不使用 Windows 驗證。此參數指定 SQL 密碼。

範例

下列範例包括 -action 參數的所有可用值。

目前設定的清單

若要取得所有目前 Windows SharePoint Services 搜尋服務 (Spsearch) 設定的清單,請使用下列語法:

Stsadm -o spsearch -action list

啟動或停止服務

若要啟動 Windows SharePoint Services 搜尋服務 (Spsearch),請使用下列語法:

stsadm -o spsearch -action start

-farmserviceaccount <網域\名稱> (服務認證)

[-farmservicepassword] <密碼>

若要停止 Windows SharePoint Services 搜尋服務 (Spsearch),並移除特定搜尋伺服器的所有索引檔案,請使用下列語法:

stsadm -o spsearch -action stop [-f]

重要

使用此參數時,會顯示下列警告訊息:「警告:即將解除安裝此伺服器上已啟用的 Windows SharePoint Services 搜尋服務,並且永久刪除所有索引檔案。您確定要永久刪除索引中的所有資料嗎?[y/n]」若要隱藏這個警告訊息,您可使用 f 參數。

附加或中斷連線資料庫

若要附加特定的內容資料庫,請使用下列語法:

Stsadm -o spsearch -action attachcontentdatabase -databasename <內容資料庫名稱> [-databaseserver <伺服器\執行個體>] [-searchserver <搜尋伺服器名稱>]

注意

databaseserversearchserver 為選用值。

重要

如果您卸離再重新附加內容資料庫,請注意,下次編目該內容資料庫內的內容時,將會進行完整編目,即使已要求累加編目也是一樣。因為完整編目會將編目程式所找到的所有內容都重新編目,因此無論該內容先前是否已編目,完整編目都需要花費比累加編目更多的時間才能完成。

若要中斷連線特定的內容資料庫,請使用下列語法:

Stsadm -o spsearch -action detachcontentdatabase -databasename <內容資料庫名稱> [-databaseserver <伺服器\執行個體] [-f]

注意

databaseserver 為選用值。若要隱藏這個警告訊息,您可使用 -f 值。

啟動或停止完整編目

若要啟動內容的完整編目,請使用下列語法:

Stsadm -o spsearch -action fullcrawlstart

若要停止內容的完整編目,請使用下列語法:

Stsadm -o spsearch -action fullcrawlstop

備註

如果您正在執行 Windows SharePoint Services 3.0 基礎結構更新,則當您使用內建工具還原或重新附加資料庫時,會保留每個內容資料庫的識別碼 (ID)。使用內建工具時,變更記錄檔保留的預設行為如下:

  • 還原伺服器陣列時,會保留所有資料庫的變更記錄。

  • 重新附加資料庫時,則會保留內容資料庫的變更記錄。

  • 僅還原內容資料庫時,「不會」保留內容資料庫的變更記錄。

保留資料庫識別碼及變更記錄檔時,[搜尋] 會根據編目規則所定義的定期排程繼續編目。不保留變更記錄檔時,[搜尋] 會在下次排定的編目期間,執行完整編目。如需詳細資訊,請參閱<移動內容資料庫 (Windows SharePoint Services 3.0)>與<Back up and restore the entire farm (Windows SharePoint Services 3.0 technology)>。