Grant 方法 (ObjectPermissionSet, String, Boolean, String)
在 Service Broker 服務上,授與指定之被授與者對所指定權限的存取權,以及將存取權授與給其他使用者的能力。
命名空間: Microsoft.SqlServer.Management.Smo.Broker
組件: Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)
語法
'宣告
Public Sub Grant ( _
permission As ObjectPermissionSet, _
granteeName As String, _
grantGrant As Boolean, _
asRole As String _
)
'用途
Dim instance As BrokerService
Dim permission As ObjectPermissionSet
Dim granteeName As String
Dim grantGrant As Boolean
Dim asRole As String
instance.Grant(permission, granteeName, _
grantGrant, asRole)
public void Grant(
ObjectPermissionSet permission,
string granteeName,
bool grantGrant,
string asRole
)
public:
virtual void Grant(
ObjectPermissionSet^ permission,
String^ granteeName,
bool grantGrant,
String^ asRole
) sealed
abstract Grant :
permission:ObjectPermissionSet *
granteeName:string *
grantGrant:bool *
asRole:string -> unit
override Grant :
permission:ObjectPermissionSet *
granteeName:string *
grantGrant:bool *
asRole:string -> unit
public final function Grant(
permission : ObjectPermissionSet,
granteeName : String,
grantGrant : boolean,
asRole : String
)
參數
- permission
型別:Microsoft.SqlServer.Management.Smo. . :: . .ObjectPermissionSet
指定權限的 ObjectPermissionSet 物件。
- granteeName
型別:System. . :: . .String
String 值,指定要拒絕權限存取權的被授與者。
- grantGrant
型別:System. . :: . .Boolean
Boolean 屬性,指定被授與者是否能夠將 BrokerService 物件的存取權授與其他使用者。
如果為 True,則被授與者能夠將 Service Broker 服務的存取權授與其他使用者。
如果為 False,則被授與者無法允許其他使用者存取 Service Broker 服務。
- asRole
型別:System. . :: . .String
String 值,指定當使用者將 Service Broker 服務的存取權授與其他使用者時,前者所擔任的角色。您可以針對屬於多個角色之成員的被授與者使用這個參數。
實作
IObjectPermission. . :: . .Grant(ObjectPermissionSet, String, Boolean, String)