StoredProcedure.ExecutionContextPrincipal 属性

Gets or sets the execution context principal for the stored procedure.

此 API 不符合 CLS。 

命名空间:  Microsoft.SqlServer.Management.Smo
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
<CLSCompliantAttribute(False)> _
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.SqlAzureDatabase Or SfcPropertyFlags.Deploy)> _
<SfcReferenceAttribute(GetType(User), "Server[@Name = '{0}']/Database[@Name = '{1}']/User[@Name = '{2}']",  _
    )> _
Public Property ExecutionContextPrincipal As String 
    Get 
    Set
用法
Dim instance As StoredProcedure 
Dim value As String 

value = instance.ExecutionContextPrincipal

instance.ExecutionContextPrincipal = value
[CLSCompliantAttribute(false)]
[SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Deploy)]
[SfcReferenceAttribute(typeof(User), "Server[@Name = '{0}']/Database[@Name = '{1}']/User[@Name = '{2}']", 
    )]
public string ExecutionContextPrincipal { get; set; }
[CLSCompliantAttribute(false)]
[SfcPropertyAttribute(SfcPropertyFlags::None|SfcPropertyFlags::Standalone|SfcPropertyFlags::SqlAzureDatabase|SfcPropertyFlags::Deploy)]
[SfcReferenceAttribute(typeof(User), L"Server[@Name = '{0}']/Database[@Name = '{1}']/User[@Name = '{2}']", 
    )]
public:
property String^ ExecutionContextPrincipal {
    String^ get ();
    void set (String^ value);
}
[<CLSCompliantAttribute(false)>]
[<SfcPropertyAttribute(SfcPropertyFlags.None|SfcPropertyFlags.Standalone|SfcPropertyFlags.SqlAzureDatabase|SfcPropertyFlags.Deploy)>]
[<SfcReferenceAttribute(typeof(User), "Server[@Name = '{0}']/Database[@Name = '{1}']/User[@Name = '{2}']", 
    )>]
member ExecutionContextPrincipal : string with get, set
function get ExecutionContextPrincipal () : String 
function set ExecutionContextPrincipal (value : String)

属性值

类型:System.String
A String value that specifies the server principal context in which the object is executed.

注释

If the ExecutionContext property is set to ExecuteAsPrincipal, a value is required for the ExecutionContextPrincipal property.

示例

创建、更改和删除存储过程

请参阅

参考

StoredProcedure 类

Microsoft.SqlServer.Management.Smo 命名空间

其他资源

CREATE PROCEDURE (Transact-SQL)