ConfigurationSetting 方法 - SetUnattendedExecutionAccount

指定用于执行无人参与报表的帐户。

语法

Public Sub SetUnattendedExecutionAccount(UserName as String, _  
    Password as String, ByRef HRESULT as Int32)  
public void SetUnattendedExecutionAccount (string UserName,   
    string Password, out Int32 HRESULT);  

参数

UserName
用于无人参与执行的 Windows 帐户。

密码
指定帐户的密码。

HRESULT
[out] 指示调用是成功还是失败的值。

返回值

返回 HRESULT ,指示方法调用是成功还是失败。 值 0 指示方法调用已成功。 非零值指示发生了错误。

注解

SetUnattendedExecutionAccount 方法不验证报表服务器是否可以指定用户身份登录。

不能使用 SetUnattendedExecutionAccount 方法在报表服务器 Windows 服务的上下文中运行无人参与的执行。

要求

命名空间:root\Microsoft\SqlServer\ReportServer\<InstanceName>\v13\Admin

另请参阅

MSReportServer_ConfigurationSetting 成员