Grant 方法 (ObjectPermissionSet, String[], Boolean, String)

授與指定的權限集給被授與者,以及在資料表上將所擔任角色的權限集授與其他使用者的能力。

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

語法

'宣告
Public Sub Grant ( _
    permission As ObjectPermissionSet, _
    granteeNames As String(), _
    grantGrant As Boolean, _
    asRole As String _
)
'用途
Dim instance As Table
Dim permission As ObjectPermissionSet
Dim granteeNames As String()
Dim grantGrant As Boolean
Dim asRole As String

instance.Grant(permission, granteeNames, _
    grantGrant, asRole)
public void Grant(
    ObjectPermissionSet permission,
    string[] granteeNames,
    bool grantGrant,
    string asRole
)
public:
virtual void Grant(
    ObjectPermissionSet^ permission, 
    array<String^>^ granteeNames, 
    bool grantGrant, 
    String^ asRole
) sealed
abstract Grant : 
        permission:ObjectPermissionSet * 
        granteeNames:string[] * 
        grantGrant:bool * 
        asRole:string -> unit 
override Grant : 
        permission:ObjectPermissionSet * 
        granteeNames:string[] * 
        grantGrant:bool * 
        asRole:string -> unit 
public final function Grant(
    permission : ObjectPermissionSet, 
    granteeNames : String[], 
    grantGrant : boolean, 
    asRole : String
)

參數

  • grantGrant
    型別:System. . :: . .Boolean
    Boolean 屬性,這個屬性會指定被授與者是否能夠將權限集授與其他資料表使用者。
    如果為 True,則表示被授與者能夠將指定的權限集授與其他資料表使用者,否則為 False。
  • asRole
    型別:System. . :: . .String
    String 值,這個值會指定將指定之權限集授與其他資料表使用者時,該使用者所擔任的角色。您可以針對屬於多個角色之成員的被授與者使用這個參數。

實作

IObjectPermission. . :: . .Grant(ObjectPermissionSet, array<String> [] () [] [], Boolean, String)