DatabasePermission DatabasePermission DatabasePermission Class

Definition

The DatabasePermission object represents a SQL Server database permission. The database permission can be added to a database permission set, and then granted, revoked, or denied to a user.

public ref class DatabasePermission sealed
public sealed class DatabasePermission
Public NotInheritable Class DatabasePermission
Inheritance
DatabasePermissionDatabasePermissionDatabasePermission

Examples

Granting, Revoking, and Denying Permissions

Remarks

Database permissions are required when running granting, denying, or revoking permissions on a database. The DatabasePermission object is used to specify the set of permissions that apply to the Grant, Deny, and Revoke methods of the Database object. Also, database permissions can be added to the DatabasePermissionSet object, which can also be used with the Grant, Deny, and Revoke 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.

Properties

Alter Alter Alter

Gets a permission that can be included in the database permission set.

AlterAnyApplicationRole AlterAnyApplicationRole AlterAnyApplicationRole

Gets a permission that can be included in the database permission set.

AlterAnyAssembly AlterAnyAssembly AlterAnyAssembly

Gets a permission that can be included in the database permission set.

AlterAnyAsymmetricKey AlterAnyAsymmetricKey AlterAnyAsymmetricKey

Gets a permission that can be included in the database permission set.

AlterAnyCertificate AlterAnyCertificate AlterAnyCertificate

Gets a permission that can be included in the database permission set.

AlterAnyContract AlterAnyContract AlterAnyContract

Gets a permission that can be included in the database permission set.

AlterAnyDatabaseAudit AlterAnyDatabaseAudit AlterAnyDatabaseAudit

Gets a permission that can be included in the database permission set.

AlterAnyDatabaseDdlTrigger AlterAnyDatabaseDdlTrigger AlterAnyDatabaseDdlTrigger

Gets a permission that can be included in the database permission set.

AlterAnyDatabaseEventNotification AlterAnyDatabaseEventNotification AlterAnyDatabaseEventNotification

Gets a permission that can be included in the database permission set.

AlterAnyDataspace AlterAnyDataspace AlterAnyDataspace

Gets a permission that can be included in the database permission set.

AlterAnyExternalDataSource AlterAnyExternalDataSource AlterAnyExternalDataSource

Gets the external data source to alter.

AlterAnyExternalFileFormat AlterAnyExternalFileFormat AlterAnyExternalFileFormat

Gets the external file format to alter.

AlterAnyFulltextCatalog AlterAnyFulltextCatalog AlterAnyFulltextCatalog

Gets a permission that can be included in the database permission set.

AlterAnyMessageType AlterAnyMessageType AlterAnyMessageType

Gets a permission that can be included in the database permission set.

AlterAnyRemoteServiceBinding AlterAnyRemoteServiceBinding AlterAnyRemoteServiceBinding

Gets a permission that can be included in the database permission set.

AlterAnyRole AlterAnyRole AlterAnyRole

Gets a permission that can be included in the database permission set.

AlterAnyRoute AlterAnyRoute AlterAnyRoute

Gets a permission that can be included in the database permission set.

AlterAnySchema AlterAnySchema AlterAnySchema

Gets a permission that can be included in the database permission set.

AlterAnySecurityPolicy AlterAnySecurityPolicy AlterAnySecurityPolicy

Gets a value that indicates whether to alter any security policy.

AlterAnyService AlterAnyService AlterAnyService

Gets a permission that can be included in the database permission set.

AlterAnySymmetricKey AlterAnySymmetricKey AlterAnySymmetricKey

Gets a permission that can be included in the database permission set.

AlterAnyUser AlterAnyUser AlterAnyUser

Gets a permission that can be included in the database permission set.

Authenticate Authenticate Authenticate

Gets a permission that can be included in the database permission set.

BackupDatabase BackupDatabase BackupDatabase

Gets a permission that can be included in the database permission set.

BackupLog BackupLog BackupLog

Gets a permission that can be included in the database permission set.

Checkpoint Checkpoint Checkpoint

Gets a permission that can be included in the database permission set.

Connect Connect Connect

Gets a permission that can be included in the database permission set.

ConnectReplication ConnectReplication ConnectReplication

Gets a permission that can be included in the database permission set.

Control Control Control

Gets a permission that can be included in the database permission set.

CreateAggregate CreateAggregate CreateAggregate

Gets a permission that can be included in the database permission set.

CreateAssembly CreateAssembly CreateAssembly

Gets a permission that can be included in the database permission set.

CreateAsymmetricKey CreateAsymmetricKey CreateAsymmetricKey

Gets a permission that can be included in the database permission set.

CreateCertificate CreateCertificate CreateCertificate

Gets a permission that can be included in the database permission set.

CreateContract CreateContract CreateContract

Gets a permission that can be included in the database permission set.

CreateDatabase CreateDatabase CreateDatabase

Gets a permission that can be included in the database permission set.

CreateDatabaseDdlEventNotification CreateDatabaseDdlEventNotification CreateDatabaseDdlEventNotification

Gets a permission that can be included in the database permission set.

CreateDefault CreateDefault CreateDefault

Gets a permission that can be included in the database permission set.

CreateFulltextCatalog CreateFulltextCatalog CreateFulltextCatalog

Gets a permission that can be included in the database permission set.

CreateFunction CreateFunction CreateFunction

Gets a permission that can be included in the database permission set.

CreateMessageType CreateMessageType CreateMessageType

Gets a permission that can be included in the database permission set.

CreateProcedure CreateProcedure CreateProcedure

Gets a permission that can be included in the database permission set.

CreateQueue CreateQueue CreateQueue

Gets a permission that can be included in the database permission set.

CreateRemoteServiceBinding CreateRemoteServiceBinding CreateRemoteServiceBinding

Gets a permission that can be included in the database permission set.

CreateRole CreateRole CreateRole

Gets a permission that can be included in the database permission set.

CreateRoute CreateRoute CreateRoute

Gets a permission that can be included in the database permission set.

CreateRule CreateRule CreateRule

Gets a permission that can be included in the database permission set.

CreateSchema CreateSchema CreateSchema

Gets a permission that can be included in the database permission set.

CreateService CreateService CreateService

Gets a permission that can be included in the database permission set.

CreateSymmetricKey CreateSymmetricKey CreateSymmetricKey

Gets a permission that can be included in the database permission set.

CreateSynonym CreateSynonym CreateSynonym

Gets a permission that can be included in the database permission set.

CreateTable CreateTable CreateTable

Gets a permission that can be included in the database permission set.

CreateType CreateType CreateType

Gets a permission that can be included in the database permission set.

CreateView CreateView CreateView

Gets a permission that can be included in the database permission set.

CreateXmlSchemaCollection CreateXmlSchemaCollection CreateXmlSchemaCollection

Gets a permission that can be included in the database permission set.

Delete Delete Delete

Gets a permission that can be included in the database permission set.

Execute Execute Execute

Gets a permission that can be included in the database permission set.

Insert Insert Insert

Gets a permission that can be included in the database permission set.

References References References

Gets a permission that can be included in the database permission set.

Select Select Select

Gets a permission that can be included in the database permission set.

Showplan Showplan Showplan

Gets a permission that can be included in the database permission set.

SubscribeQueryNotifications SubscribeQueryNotifications SubscribeQueryNotifications

Gets a permission that can be included in the database permission set.

TakeOwnership TakeOwnership TakeOwnership

Gets a permission that can be included in the database permission set.

Update Update Update

Gets a permission that can be included in the database permission set.

ViewDatabaseState ViewDatabaseState ViewDatabaseState

Gets a permission that can be included in the database permission set.

ViewDefinition ViewDefinition ViewDefinition

Gets a permission that can be included in the database permission set.

Methods

Add(DatabasePermission, DatabasePermission) Add(DatabasePermission, DatabasePermission) Add(DatabasePermission, DatabasePermission)

Returns a set of database permissions after adding a new database permission to an existing set of database permissions.

BitwiseOr(DatabasePermission, DatabasePermission) BitwiseOr(DatabasePermission, DatabasePermission) BitwiseOr(DatabasePermission, DatabasePermission)

Creates a database permission set by performing a bitwise OR operation on two DatabasePermission objects.

Equals(Object) Equals(Object) Equals(Object)

Determines whether the referenced database permission object is equal to a specified object.

GetHashCode() GetHashCode() GetHashCode()

This method supports the SQL Server infrastructure and is not intended to be used directly from your code.

ToDatabasePermissionSet(DatabasePermission) ToDatabasePermissionSet(DatabasePermission) ToDatabasePermissionSet(DatabasePermission)

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

Operators

Addition(DatabasePermission, DatabasePermission) Addition(DatabasePermission, DatabasePermission) Addition(DatabasePermission, DatabasePermission)

Creates a database permission set by performing an addition operation on two DatabasePermission objects.

BitwiseOr(DatabasePermission, DatabasePermission) BitwiseOr(DatabasePermission, DatabasePermission) BitwiseOr(DatabasePermission, DatabasePermission)

Creates a database permission set by performing a bitwise OR operation on two DatabasePermission objects.

Equality(DatabasePermission, DatabasePermission) Equality(DatabasePermission, DatabasePermission) Equality(DatabasePermission, DatabasePermission)

Compares two DatabasePermission objects in an equality operation.

Implicit(DatabasePermission to DatabasePermissionSet) Implicit(DatabasePermission to DatabasePermissionSet) Implicit(DatabasePermission to DatabasePermissionSet)

Converts a single database permission object to a database permission set.

Inequality(DatabasePermission, DatabasePermission) Inequality(DatabasePermission, DatabasePermission) Inequality(DatabasePermission, DatabasePermission)

Determines whether two DatabasePermission objects are not equal by performing an inequality operation.

Applies to