共用方式為


ConfigurationSetting 方法 - SetServiceState

開啟和關閉報表伺服器 Windows 與 Web 服務。

語法

Public Sub SetServiceState(ByVal EnableWindowsService As Boolean, _  
    ByVal EnableWebService As Boolean, ByVal EnableReportManager As Boolean, _  
    ByRef HRESULT As Int32)  
public void SetServiceState(Boolean EnableWindowsService,  
    Boolean EnableWebService, Boolean EnableReportManager, out Int32 HRESULT);  

參數

EnableWindowsService
表示 Windows 服務狀態的 布林 值。 true 值會啟動報表伺服器 Windows 服務。 false 值會停止 Windows 服務。

EnableWebService
表示 Reporting Services Web 服務狀態的布林值true 值會啟動報表伺服器 Web 服務。 false 值會停止 Web 服務。

EnableReportManager
表示報表管理員所需狀態的 布林 值。

注意

此設定已在 SQL Server 2016 Reporting Services 累積更新 2 之後淘汰。 入口網站會一律啟用。 會忽略 值。

HRESULT
[out] 指出呼叫成功或失敗的值。

傳回值

傳回 HRESULT ,指出方法呼叫成功或失敗。 值為 0 表示方法呼叫成功。 非零值表示發生錯誤。

需求

Namespace: root\Microsoft\SqlServer\ReportServer\<InstanceName>\v13\Admin

MSReportServer_ConfigurationSetting 成員