共用方式為


OwnerLoginName 屬性

Gets or sets the owner of the job.

命名空間:  Microsoft.SqlServer.Management.Smo.Agent
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
<SfcPropertyAttribute> _
Public Property OwnerLoginName As String
    Get
    Set
'用途
Dim instance As Job
Dim value As String

value = instance.OwnerLoginName

instance.OwnerLoginName = value
[SfcPropertyAttribute]
public string OwnerLoginName { get; set; }
[SfcPropertyAttribute]
public:
property String^ OwnerLoginName {
    String^ get ();
    void set (String^ value);
}
[<SfcPropertyAttribute>]
member OwnerLoginName : string with get, set
function get OwnerLoginName () : String
function set OwnerLoginName (value : String)

屬性值

型別:System. . :: . .String
A String value that specifies the logon name of the job owner.

備註

Microsoft SQL Server establishes ownership rules for jobs. Some permissions default to a job owner, and ownership forms one part of SQL Server access control.

Set the OwnerLoginName property to change ownership for the referenced job. The value must specify an existing SQL Server database user. Permission to change job ownership defaults to members of the sysadmin group.