DatabasePermission.ToDatabasePermissionSet 方法

Returns a set of database permissions, based on a single database permission, by converting a DatabasePermission object to a DatabasePermissionSet object.

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

语法

声明
Public Shared Function ToDatabasePermissionSet ( _
    permission As DatabasePermission _
) As DatabasePermissionSet
用法
Dim permission As DatabasePermission 
Dim returnValue As DatabasePermissionSet 

returnValue = DatabasePermission.ToDatabasePermissionSet(permission)
public static DatabasePermissionSet ToDatabasePermissionSet(
    DatabasePermission permission
)
public:
static DatabasePermissionSet^ ToDatabasePermissionSet(
    DatabasePermission^ permission
)
static member ToDatabasePermissionSet : 
        permission:DatabasePermission -> DatabasePermissionSet
public static function ToDatabasePermissionSet(
    permission : DatabasePermission
) : DatabasePermissionSet

参数

返回值

类型:Microsoft.SqlServer.Management.Smo.DatabasePermissionSet
A DatabasePermissionSet object that specifies a single server permission.

示例

授予、撤消和拒绝权限

请参阅

参考

DatabasePermission 类

Microsoft.SqlServer.Management.Smo 命名空间

其他资源

权限(数据库引擎)

sys.server_permissions (Transact-SQL)