次の方法で共有


ServerRole.Grant メソッド (ObjectPermissionSet, array<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 ServerRole 
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
)

パラメーター

  • granteeNames
    型: array<System.String[]
    特定の権限のセットが許可される権限付与対象ユーザーの一覧を示す String 配列です。
  • grantGrant
    型: System.Boolean
    権限付与対象ユーザーに対し、サーバー ロールの指定した権限セットを他のユーザーに許可する権限を付与するかどうかを示す Boolean プロパティです。
  • asRole
    型: System.String
    サーバー ロールの指定された権限のセットを他のユーザーに許可するときに、ユーザーが与えられるロールを示す String 値です。 このパラメーターは、複数のロールのメンバーである権限付与対象ユーザーに対して使用します。

実装

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

関連項目

参照

ServerRole クラス

Grant オーバーロード

Microsoft.SqlServer.Management.Smo 名前空間