訂閱設定與檔案共用帳戶 (報表伺服器組態管理員)

使用 Reporting Services 組態管理員的 [訂閱設定] 頁面,針對原生模式報表伺服器與檔案共用訂閱,設定檔案共用帳戶。 檔案共用帳戶可讓您在將報表傳遞至檔案共用的多個訂閱中,使用單一認證組合。 當變更認證時,您可針對檔案共用帳戶設定變更,而無須更新每個個別訂閱。

Reporting Services 檔案共用訂閱同時存有兩個工作流程:

  • 您的 Reporting Services 系統管理員可以使用 SQL Server 2016 (13.x) 版本的新功能,設定單一檔案共用帳戶以供一到多個訂閱使用。 設定 [指定檔案共用帳戶] ,然後使用者要在個別的訂閱設定頁面上,選取 [使用檔案共用帳戶] 。

  • 針對目的檔案共用,使用特定認證設定個別訂閱。

  • 您也可以混用兩種方法,讓某些檔案共用訂閱使用中央檔案共用帳戶,而其他訂閱則使用特定認證。

適用於:Reporting Services 原生模式。

指定檔案共用帳戶

如果選取此選項,您就可以提供帳戶,從報表伺服器存取檔案共用。 若您設定檔案共用帳戶,則所有使用者皆可針對設為傳送報表至檔案共用的任何訂閱為其選取帳戶。 若未選取此選項,則檔案共用帳戶 適用於任何訂閱。

請注意,您必須確認設定為檔案共用帳戶的帳戶,具有可讓任何檔案共用使用者用於檔案共用傳送的讀取和寫入權限。

下圖是使用者針對檔案共用傳送所設定訂閱看到的內容。 若未設定檔案共用帳戶,則會停用 [使用檔案共用帳戶] 。

configuration manager file share account

防止權限提升或提高權限

重要

Reporting Services 服務帳戶可控制訂閱傳送,並與檔案共用訂閱所使用的帳戶進行互動。 Windows 安全性功能會限制以下組合:1) Reporting Services 服務帳戶、2) 檔案共用帳戶使用的帳戶。 例如,若針對檔案共用帳戶使用內建作業系統帳戶,則 Reporting Services 服務帳戶必須為具有模擬權限的其他服務帳戶。 若已設定明確的檔案共用帳戶和密碼,則檔案共用帳戶必須有權登入執行 Reporting Services 服務的電腦 (透過允許本機登入)。 若檔案共用帳戶不具必要權限,則使用檔案共用帳戶的訂閱將會失敗,且產生類似下列內容的錯誤訊息:

"Failure writing file {file} : An impersonation error occurred using the security context of the current user."

稽核使用檔案共用帳戶的 PowerShell 範例

執行下列 Windows PowerShell 指令碼,以列出所有設為使用檔案共用帳戶的 Reporting Services 訂閱。 將 SERVERNAME 更新為報表伺服器的適當值。

# get all file share subscriptions using the default file share account  
$extensionNameMatch = "Report Server FileShare"  
$extensionSettingMatch = "DEFAULTCREDENTIALS"  
$valueMatch = "True"  
  
# filter for subscriptions that have a given extension setting  
filter script:extensionSettingFilter  
{  
    # subscription must match the extension name  
    if($_.DeliverySettings.Extension -eq $extensionNameMatch)  
    {  
        # locate the extension parameter of interest  
        ForEach($extensionParameter in $_.DeliverySettings.ParameterValues)  
        {  
            # if the setting has the desired value, return the subscription  
            if($extensionParameter.Name -eq $extensionSettingMatch -and $extensionParameter.Value -eq $valueMatch)  
            {  
                $_  
                break  
            }  
        }  
    }  
}  
  
$rs2010 = New-WebServiceProxy -Uri "https:// SERVERNAME/ReportServer/ReportService2010.asmx" -Namespace SSRS.ReportingService2010 -UseDefaultCredential;  
$subscriptions = $rs2010.ListSubscriptions("/");  
  
Write-Host "----- File share subscriptions using the default file share account ----";  
Write-Host "-------------------------------------------------------------------------- ";  
$subscriptions | extensionSettingFilter | select report, owner, status, lastexecuted, description, subscriptionid | format-table -auto  
  

指令碼的輸出內容如下所示 ︰

----- File share subscriptions using the default file share account ----

-----------------------------------------------------------------------------------------------------

Report Owner Status LastExecuted SubscriptionID

------------------------ -------------- -------- -------------------- ------------------------------------

Aworks_sales_by_territory DOMAIN\UserName Disabled 10/5/2014 1:04:04 PM e843bc2b-023e-45a3-ba23-22f9dc9a0934

另請參閱

Reporting Services 中的檔案共用傳遞
建立及管理原生模式報表伺服器的訂閱