Delen via


ServerPermission Class

The ServerPermission object represents a SQL Server server-level permission.

Inheritance Hierarchy

System.Object
  Microsoft.SqlServer.Management.Smo.ServerPermission

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

Syntax

'Declaration
Public NotInheritable Class ServerPermission
'Usage
Dim instance As ServerPermission
public sealed class ServerPermission
public ref class ServerPermission sealed
[<SealedAttribute>]
type ServerPermission =  class end
public final class ServerPermission

The ServerPermission type exposes the following members.

Properties

  Name Description
Public propertyStatic member AdministerBulkOperations Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterAnyAvailabilityGroup Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterAnyConnection Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterAnyCredential Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterAnyDatabase Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterAnyEndpoint Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterAnyEventNotification Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterAnyEventSession Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterAnyLinkedServer Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterAnyLogin Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterAnyServerAudit Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterAnyServerRole Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterResources Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterServerState Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterSettings Gets a permission that can be included in the server permission set.
Public propertyStatic member AlterTrace Gets a permission that can be included in the server permission set.
Public propertyStatic member AuthenticateServer Gets a permission that can be included in the server permission set.
Public propertyStatic member ConnectSql Gets a permission that can be included in the server permission set.
Public propertyStatic member ControlServer Gets a permission that can be included in the server permission set.
Public propertyStatic member CreateAnyDatabase Gets a permission that can be included in the server permission set.
Public propertyStatic member CreateAvailabilityGroup Gets a permission that can be included in the server permission set.
Public propertyStatic member CreateDdlEventNotification Gets a permission that can be included in the server permission set.
Public propertyStatic member CreateEndpoint Gets a permission that can be included in the server permission set.
Public propertyStatic member CreateServerRole Gets a permission that can be included in the server permission set.
Public propertyStatic member CreateTraceEventNotification Gets a permission that can be included in the server permission set.
Public propertyStatic member ExternalAccessAssembly Gets a permission that can be included in the server permission set.
Public propertyStatic member Shutdown Gets a permission that can be included in the server permission set.
Public propertyStatic member UnsafeAssembly Gets a permission that can be included in the server permission set.
Public propertyStatic member ViewAnyDatabase Gets a permission that can be included in the server permission set.
Public propertyStatic member ViewAnyDefinition Gets a permission that can be included in the server permission set.
Public propertyStatic member ViewServerState Gets a permission that can be included in the server permission set.

Top

Methods

  Name Description
Public methodStatic member Add Returns a set of server permissions after adding a new server permission to an existing set of server permissions.
Public methodStatic member BitwiseOr Combines two Server Permissions using an inclusive OR.
Public method Equals Determines whether the referenced server permission object is equal to a specified object. (Overrides Object.Equals(Object).)
Public method GetHashCode Do not reference this member directly in your code. It supports the SQL Server infrastructure. (Overrides Object.GetHashCode().)
Public method GetType (Inherited from Object.)
Public methodStatic member ToServerPermissionSet Returns a set of server permissions based on a single server permission, by converting a ServerPermission object to a ServerPermissionSet object.
Public method ToString (Inherited from Object.)

Top

Operators

  Name Description
Public operatorStatic member Addition Creates a server permission set by performing an addition operation on two ServerPermission objects.
Public operatorStatic member BitwiseOr Creates a server permission set by performing a bitwise OR operation on two ServerPermission objects.
Public operatorStatic member Equality Creates a server permission set by performing an equality operation on two ServerPermission objects.
Public operatorStatic member Implicit(ServerPermission to ServerPermissionSet) Creates a new server permission set by implicitly converting server permission.
Public operatorStatic member Inequality Creates a server permission set by performing an inequality operation on two ServerPermission objects.

Top

Remarks

Server permissions are required when granting, denying, or revoking server-level permissions on an instance of SQL Server. The ServerPermission object is used to specify the set of permissions that apply to the Grant, Deny, and Revoke methods of the Server object. Also, server permissions can be added to the ServerPermissionSet object, which can also be used with the Deny, Revoke, and Grant methods.

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Examples

Granting, Revoking, and Denying Permissions

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Granting, Revoking, and Denying Permissions

Permissions (Database Engine)