Share via


ServerPermission.ToServerPermissionSet Method

Returns a set of server permissions based on a single server permission, by converting a ServerPermission object to a ServerPermissionSet object.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Shared Function ToServerPermissionSet ( _
    permission As ServerPermission _
) As ServerPermissionSet
'Usage
Dim permission As ServerPermission 
Dim returnValue As ServerPermissionSet 

returnValue = ServerPermission.ToServerPermissionSet(permission)
public static ServerPermissionSet ToServerPermissionSet(
    ServerPermission permission
)
public:
static ServerPermissionSet^ ToServerPermissionSet(
    ServerPermission^ permission
)
static member ToServerPermissionSet : 
        permission:ServerPermission -> ServerPermissionSet
public static function ToServerPermissionSet(
    permission : ServerPermission
) : ServerPermissionSet

Parameters

Return Value

Type: Microsoft.SqlServer.Management.Smo.ServerPermissionSet
A ServerPermissionSet object that specifies a single server permission.

Examples

Granting, Revoking, and Denying Permissions

See Also

Reference

ServerPermission Class

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Permissions (Database Engine)

sys.server_permissions (Transact-SQL)