共用方式為


Configure Excel Services data refresh by using the unattended service account (SharePoint Server 2010)

 

適用版本: Excel Services, SharePoint Server 2010

上次修改主題的時間: 2017-01-19

Microsoft SharePoint Server 2010 的 Excel Services provides three methods of using Secure Store to refresh the external data source in a workbook:

Using the unattended service account involves configuring an Active Directory account and granting it access to your data, storing the credentials for this account in Secure Store, and configuring Excel Services to use the stored credentials when it needs to refresh the data in a workbook.

The following steps are required to configure the unattended service account in Excel Services.

  1. Configure a data access account

  2. Configure a Secure Store target application for the unattended service account

  3. Configure Excel Services Global Settings

  4. Configure a workbook to use the unattended service account

Configure a data access account

The unattended service account requires an Active Directory account for data access. Have your domain administrator create an Active Directory account that you can use for data access.

Once the account has been created, you must grant this account read access to the data source that you will be using in your data-connected Microsoft Excel workbook. Use the following procedure to create a logon for the data access account in Microsoft SQL Server. (If you are using a data source other than SQL Server, see the instructions for your data source to create a logon with data-read permissions for the data access account.)

To create a SQL Server logon for the data access account

  1. In SQL Server Management Studio, connect to the database engine.

  2. In Object Explorer, expand Security.

  3. Right-click Logins, and then click New Login.

  4. In the Login name box, type the name of the Active Directory account that you created for data access.

  5. In the Select a page section, click User Mapping.

  6. Select the Map check box for the database that you want to provide access to, and then, under Database role membership for: <database>, select the db_datareader check box.

  7. Click OK.

Now that you have created a logon for the data access account and granted the account access to your data source, you must create a target application in Secure Store to contain the credentials for the data access account.

Configure a Secure Store target application for the unattended service account

The Secure Store Service uses a target application to define connection parameters and authorized users. The unattended service account is generally considered a catch-all account that is used for general data access. All users are granted access to the unattended service account through the target application.

In order to grant all users data access through the unattended service account, the account that is running the Excel Services application pool is added as a member of the Secure Store target application. If you do not know which account is being used to run the Excel Services, follow these steps to determine which account that is.

To find the Windows identity assigned to the Excel Services application pool

  1. On the SharePoint Central Administration Web site home page, click Security.

  2. On the Security page, under General Security, click Configure service accounts.

  3. On the Service Account page, in the Credential Management section, from the drop-down list, select the application pool that runs Excel Services 應用程式.

    When this option is selected, the name of the Excel Services 應用程式 appears in the box underneath the drop-down list. This is the Windows identity that you need for the Members list when you configure the unattended service account in Secure Store.

  4. Click Cancel.

Once you have determined which account is being used to run the application pool for the Excel Services service application, the next step is to create a target application in Secure Store for the unattended service account. Use the following procedure to create the target application.

To create a target application for the unattended service account

  1. On the Central Administration home page, in the Application Management section, click Manage service applications.

  2. Click the Secure Store service application.

  3. On the ribbon, click New.

  4. In the Target Application ID box, type a unique identifier for this target application (for example, ExcelServicesUnattended).

  5. In the Display Name box, type a friendly name or short description.

  6. In the Contact E-mail box, type the e-mail address for a contact for this target application.

  7. In the Target Application Type drop-down list, select Group.

  8. Click Next.

  9. Leave the default credential fields, and then click Next.

  10. On the Specify the membership settings page:

    • In the Target Application Administrators box, type the account of the user who will administer this target application.

      注意

      You can specify multiple users or an Active Directory group.

    • In the Members box, type the Excel Services application pool account that you located in the previous procedure.

  11. Click OK.

Once the target application is created, you must specify which credentials should be used by it. These are the credentials of the Active Directory account that you created previously, and which have been granted read access to your data source.

Use the following procedure to set the credentials for the target application.

To set the credentials for the target application

  1. On the Secure Store Service Application page, in the Target Application ID column, point to the target application that you just created, click the arrow that appears, and then click Set Credentials.

  2. Type the user name and password of the data access account.

  3. Click OK.

Once you have set the credentials for the target application, the Secure Store Service configuration for the unattended service account is complete. The next step is to configure Excel Services to use this target application for the unattended service account.

Configure Excel Services Global Settings

The unattended service account configuration is part of the Excel Services Global Settings. Use the following procedure to configure the unattended service account in Excel Services.

To configure Excel Services Global Settings

  1. On the Central Administration home page, in the Application Management section, click Manage service applications.

  2. On the Manage Service Applications page, click the Excel Services service application.

  3. On the Manage the Excel Services page, click Global Settings.

  4. On the Excel Services Settings page, in the External Data section, in the Application ID box, type the Target Application ID of the target application that you created.

  5. Click OK.

With the Excel Services Global Settings configured, setup of the unattended service account is complete. The next section describes how to configure the Excel Services authentication settings in a data-connected Excel workbook to refresh the data with the unattended service account after the workbook has been published to a SharePoint document library.

Configure a workbook to use the unattended service account

You must configure the Excel Services Authentication Settings in the workbook before you publish it to SharePoint Server 2010. Doing so enables the workbook to use the unattended service account to refresh data when the workbook is rendered in Excel Services. Use the following procedure to configure the authentication settings.

To configure Excel Services authentication settings

  1. In a data-connected Excel workbook, on the Data tab, click Connections.

  2. On the Workbook Connections dialog box, select the data connection that you want to update, and then click Properties.

  3. On the Connection Properties dialog box, on the Definition tab, click Authentication Settings.

  4. On the Excel Services Authentication Settings dialog box, select the None option, and then click OK.

  5. On the Connection Properties dialog box, click OK.

    注意

    If you see a warning that the link to the external connection file will be removed, click Yes.

  6. On the Workbook Connections dialog box, click Close.

With the Excel Services Authentication Settings set to None, Excel Services uses the unattended service account to refresh the data in the workbook after you have published it to SharePoint Server 2010.

See Also

Concepts

Excel Services 資料重新整理流程圖