設定自動執行帳戶 (SSRS 組態管理員)Configure the Unattended Execution Account (SSRS Configuration Manager)

Reporting ServicesReporting Services 提供了一個特殊帳戶,它是用於自動報表處理和透過網路傳送連接要求。provides a special account that is used for unattended report processing and for sending connection requests across the network. 以下是使用此帳戶的方式:The account is used in the following ways:

  • 透過網路針對使用資料庫驗證的報表傳送連接要求,或是連接到不需要或不使用驗證的外部報表資料來源。Send connection requests over the network for reports that use database authentication, or connect to external report data sources that do not require or use authentication. 如需詳細資訊,請參閱《SQL Server 線上叢書》中的 指定報表資料來源的認證和連接資訊For more information, see Specify Credential and Connection Information for Report Data Sources in SQL Server Books Online.

  • 擷取報表中使用的外部影像檔。Retrieve external image files that are used in report. 如果想要使用影像檔而該檔案無法透過匿名存取來存取,則您可以設定自動報表處理帳戶,並授與該帳戶存取檔案的權限。If you want to use an image file and the file cannot be accessed through Anonymous access, you can configure the unattended report processing account and grant the account permission to access the file.

自動報表處理是指由事件觸發 (不論是排程驅動事件或資料重新整理事件),而非由使用者要求觸發的任何報表執行處理。Unattended report processing refers to any report execution process that is triggered by an event (either a schedule-driven event or data refresh event) rather than a user request. 報表伺服器使用自動報表處理帳戶,來登入主控外部資料來源的電腦。The report server uses the unattended report processing account to log on to the computer that hosts the external data source. 因為報表伺服器服務帳戶的認證絕不會用來連接到其他電腦,所以需要此帳戶。This account is necessary because the credentials of the Report Server service account are never used to connect to other computers.

重要

設定此帳戶是選擇性的。Configuring the account is optional. 不過,如果沒有加以設定,您就可能無法連接到某些資料來源,而且可能無法從遠端電腦擷取影像檔。However, if you do not configure it, you will limit your options for connecting to some data sources, and you might not be able to retrieve image files from remote computers. 如果您真的設定帳戶,就必須讓它保持最新狀態。If you do configure the account, you must keep it up to date. 具體來說,如果您讓密碼過期或者 Active Directory 中變更帳戶資訊,就會發生下列錯誤的下次在處理報表:「 登入失敗 (rsLogonFailed) 登入失敗: 未知的使用者名稱或密碼不正確。 」Specifically, if you allow a password to expire or the account information is changed in Active Directory, you will encounter the following error the next time a report is processed: "Logon failed (rsLogonFailed) Logon failure: unknown user name or bad password." 正確維護自動報表處理帳戶是很重要的,即使您從未擷取外部影像或傳送對外部電腦的連接要求也是如此。Proper maintenance of the unattended report processing account is essential, even if you never retrieve external images or send connection requests to external computers. 如果在設定帳戶之後發現並未使用該帳戶,可以將其刪除,這樣就不需經常進行帳戶維護工作。If you configure the account but then find that you are not using it, you can delete it to avoid routine account maintenance tasks.

如何設定帳戶How to Configure the Account

您必須使用網域使用者帳戶。You must use a domain user account. 為了提供原先預期的用途,此帳戶應該與用來執行報表伺服器服務的帳戶不同。To serve its intended purpose, this account should be different than the one used to run the Report Server service. 請務必使用符合下列條件的帳戶:擁有最小權限 (具有網路連接的唯讀存取權限就足夠),而且僅擁有提供資料來源和資源給報表伺服器之電腦的有限存取權。Be sure to use an account that has minimum permissions (read-only access with network connection permissions is sufficient) and limited access to just those computers that provide data sources and resources to the report server. 如需詳細資訊,請參閱 Reporting Services 組態管理員 (原生模式)For more information, see Reporting Services Configuration Manager (Native Mode).

若要指定此帳戶,您可以使用 Reporting ServicesReporting Services 組態工具或 rsconfig 公用程式。To specify the account, you can use the Reporting ServicesReporting Services Configuration tool or the rsconfig utility. 設定自動執行帳戶的最簡單方法,是執行 Reporting ServicesReporting Services 組態工具,並在 [執行帳戶] 頁面中指定認證。The easiest way to configure the unattended execution account is to run the Reporting ServicesReporting Services Configuration tool and specify credentials in the Execution Account page.

  1. 啟動 Reporting ServicesReporting Services 組態工具,並連接到您要設定的報表伺服器執行個體。Start the Reporting ServicesReporting Services Configuration tool and connect to the report server instance you want to configure. 如需指示,請參閱 Reporting Services 組態管理員 (原生模式)For instructions, see Reporting Services Configuration Manager (Native Mode).

  2. 在 [執行帳戶] 頁面上,選取 [指定執行帳戶] 。On the Execution Account page, select Specify an execution account.

  3. 鍵入帳戶和密碼,重新鍵入密碼,然後按一下 [套用] 。Type the account and password, retype the password, and then click Apply.

使用 RSCONFIG 公用程式Using RSCONFIG Utility

設定此帳戶的另一個方法是使用 rsconfig 公用程式。Another way to set the account is to use the rsconfig utility. 若要指定帳戶,請使用 rsconfig-e引數。To specify the account, use the -e argument of rsconfig. 指定 rsconfig-e 引數,會引導公用程式將帳戶資訊寫入組態檔。Specifying the -e argument for rsconfig directs the utility to write the account information to the configuration file. 您不需要指定 RSreportserver.config 的路徑。請遵循以下步驟來設定帳戶。You do not need to specify a path to RSreportserver.config. Follow these steps to configure the account.

  1. 建立或選取網域帳戶,該帳戶擁有提供資料或服務給報表伺服器之電腦和伺服器的存取權。Create or select a domain account that has access to computers and servers that provide data or services to a report server. 您應使用擁有較小權限的帳戶 (例如唯讀權限)。You should use an account that has reduced permissions (for example, read-only permissions).

  2. 開啟命令提示字元:上開始功能表上,按一下執行,型別cmd,然後按一下 確定Open a command prompt: On the Start menu, click Run, type cmd, and then click OK.

  3. 輸入下列命令,即可在本機報表伺服器執行個體上設定帳戶:Type the following command to configure the account on a local report server instance:

    rsconfig -e -u<網域/使用者名稱> -p<密碼>rsconfig -e -u<domain/username> -p<password>

rsconfig -e 可支援其他引數。rsconfig -e supports additional arguments. 如需語法的詳細資訊以及若要檢視命令範例,請參閱《SQL Server 線上叢書》中的 rsconfig 公用程式 (SSRS)For more information about syntax and to view command examples, see rsconfig Utility (SSRS) in SQL Server Books Online.

如何儲存帳戶資訊How Account Information is Stored

當您設定此帳戶時,下列設定會當做加密的值指定於本機或遠端報表伺服器執行個體上的 RSreportserver.config 檔案中:When you set the account, the following settings are specified as encrypted values in the RSreportserver.config file on a local or remote report server instance:

<UnattendedExecutionAccount>  
     <UserName></UserName>  
     <Password></Password>  
     <Domain></Domain>  
</UnattendedExecutionAccount>  

您設定了值之後,就不能將值解密,以純文字檢視這些值。Once you set the values, you cannot decrypt them to view the values in plain text. 如果您輸入錯誤的值,或者忘記自己指定的值,就必須使用 Reporting Services 組態工具,或執行 rsconfig -e 以重新開始。If you mistype the values or forget the values you specified, you must use the Reporting Services Configuration tool or run rsconfig -e to start over.

如何使用自動報表處理帳戶How to Use the Unattended Report Processing Account

為了擷取影像檔,報表伺服器會自動使用此帳戶,而且您不需要採取特定的動作。To retrieve image files, the report server uses the account automatically and no specific action is required on your part. 若要使用此帳戶連線到提供資料給報表的外部資料來源,您必須在報表資料來源或共用資料來源的資料來源屬性頁面上指定 [認證類型] 選項:To use the account to connect to external data sources that provide data to reports, you must specify a Credential Type option in the data source properties page of the report data source or shared data source:

  • 在報表管理員或 SharePoint 網站上,選取不需要認證選項。In Report Manager or on a SharePoint site, select the Credentials are not required option.

自動報表處理帳戶主要是用來連接外部伺服器,而不是登入資料庫伺服器。The unattended report processing account is used primarily to connect to external servers, and not as a login to database servers. 如果您想要使用此帳戶認證來登入資料庫,就必須在連接字串中指定認證。If you want to use the account credentials to log in to a database, you must specify credentials in the connection string. 如果資料庫伺服器支援 Windows 整合式安全性,而且自動報表處理所使用的帳戶擁有讀取資料庫的權限,您就可以指定 Integrated Security=SSPIYou can specify Integrated Security=SSPI if the database server supports Windows integrated security and the account used for unattended report processing has permission to read the database. 否則,您必須在連接字串中輸入使用者名稱和密碼,而此連接字串會以純文字格式顯示給有權編輯資料來源連接屬性的任何使用者查看。Otherwise, you must enter the user name and password in the connection string, where it appears in clear text to any user who has permission to edit data source connection properties.

雖然系統不會禁止您在建立連接之後使用自動報表處理帳戶來擷取資料,但是我們不建議您這樣做。Although you are not prevented from using the unattended report processing account to retrieve data after the connection is made, doing so is not recommended. 您應該針對非常特定的功能使用此帳戶。The account is supposed to be used for very specific functions. 如果您用它來擷取資料,就會破壞它原本設計的用途。If you use it to retrieve data, you undermine the purpose for which it is intended.

如何維護自動報表處理帳戶How to Maintain the Unattended Report Processing Account

一旦定義此帳戶後,就必須確保帳戶和密碼都保持最新狀態。Once you define the account, you must ensure that the account and password are kept up to date. 您可以使用 Reporting ServicesReporting Services 組態工具來更新儲存此帳戶之相關資訊的組態設定。You can use the Reporting ServicesReporting Services Configuration tool to update the configuration settings that store information about this account.

  1. 啟動 Reporting ServicesReporting Services 組態工具,並連接到您要設定的報表伺服器執行個體。Start the Reporting ServicesReporting Services Configuration tool and connect to the report server instance you want to configure.

  2. 在 [執行帳戶] 頁面上,確認已經選取 [指定執行帳戶] 。On the Execution Account page, verify that Specify an execution account is selected.

  3. 鍵入新帳戶和密碼,重新鍵入密碼,然後按一下 [套用] 。Type the new account or password, retype the password, and then click Apply.

如何刪除自動報表處理帳戶How to Delete the Unattended Report Processing Account

如果沒有使用此帳戶,可以將其刪除,這樣就不需經常進行帳戶維護工作。If you are not using the account, you can delete it to avoid routine account maintenance tasks.

  1. 啟動 Reporting ServicesReporting Services 組態工具,並連接到您要設定的報表伺服器執行個體。Start the Reporting ServicesReporting Services Configuration tool and connect to the report server instance you want to configure.

  2. 在 [執行帳戶] 頁面上,清除 [指定執行帳戶] 。On the Execution Account page, clear Specify an execution account.

  3. 按一下 [套用]Click Apply.

帳戶資訊會隨即從 RSReportServer.config 檔案中移除。The account information is removed from the RSReportServer.config file.

另請參閱See Also

Reporting Services 組態管理員(del)Reporting Services Configuration Manager (del)