Export (0) Print
Expand All

DatabasePermission Class

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.

System.Object
  Microsoft.SqlServer.Management.Smo.DatabasePermission

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

public sealed class DatabasePermission

The DatabasePermission type exposes the following members.

  NameDescription
Public propertyStatic memberAlterGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyApplicationRoleGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyAssemblyGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyAsymmetricKeyGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyCertificateGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyContractGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyDatabaseAuditGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyDatabaseDdlTriggerGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyDatabaseEventNotificationGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyDataspaceGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyFulltextCatalogGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyMessageTypeGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyRemoteServiceBindingGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyRoleGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyRouteGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnySchemaGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyServiceGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnySymmetricKeyGets a permission that can be included in the database permission set.
Public propertyStatic memberAlterAnyUserGets a permission that can be included in the database permission set.
Public propertyStatic memberAuthenticateGets a permission that can be included in the database permission set.
Public propertyStatic memberBackupDatabaseGets a permission that can be included in the database permission set.
Public propertyStatic memberBackupLogGets a permission that can be included in the database permission set.
Public propertyStatic memberCheckpointGets a permission that can be included in the database permission set.
Public propertyStatic memberConnectGets a permission that can be included in the database permission set.
Public propertyStatic memberConnectReplicationGets a permission that can be included in the database permission set.
Public propertyStatic memberControlGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateAggregateGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateAssemblyGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateAsymmetricKeyGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateCertificateGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateContractGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateDatabaseGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateDatabaseDdlEventNotificationGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateDefaultGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateFulltextCatalogGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateFunctionGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateMessageTypeGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateProcedureGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateQueueGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateRemoteServiceBindingGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateRoleGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateRouteGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateRuleGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateSchemaGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateServiceGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateSymmetricKeyGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateSynonymGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateTableGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateTypeGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateViewGets a permission that can be included in the database permission set.
Public propertyStatic memberCreateXmlSchemaCollectionGets a permission that can be included in the database permission set.
Public propertyStatic memberDeleteGets a permission that can be included in the database permission set.
Public propertyStatic memberExecuteGets a permission that can be included in the database permission set.
Public propertyStatic memberInsertGets a permission that can be included in the database permission set.
Public propertyStatic memberReferencesGets a permission that can be included in the database permission set.
Public propertyStatic memberSelectGets a permission that can be included in the database permission set.
Public propertyStatic memberShowplanGets a permission that can be included in the database permission set.
Public propertyStatic memberSubscribeQueryNotificationsGets a permission that can be included in the database permission set.
Public propertyStatic memberTakeOwnershipGets a permission that can be included in the database permission set.
Public propertyStatic memberUpdateGets a permission that can be included in the database permission set.
Public propertyStatic memberViewDatabaseStateGets a permission that can be included in the database permission set.
Public propertyStatic memberViewDefinitionGets a permission that can be included in the database permission set.
Top

  NameDescription
Public methodStatic memberAddReturns a set of database permissions after adding a new database permission to an existing set of database permissions.
Public methodStatic memberBitwiseOrCreates a database permission set by performing a bitwise OR operation on two DatabasePermission objects.
Public methodEqualsDetermines whether the referenced database permission object is equal to a specified object. (Overrides Object.Equals(Object).)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCodeThis method supports the SQL Server infrastructure and is not intended to be used directly from your code. (Overrides Object.GetHashCode().)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodStatic memberToDatabasePermissionSetReturns a set of database permissions, based on a single database permission, by converting a DatabasePermission object to a DatabasePermissionSet object.
Public methodToString (Inherited from Object.)
Top

  NameDescription
Public operatorStatic memberAdditionCreates a database permission set by performing an addition operation on two DatabasePermission objects.
Public operatorStatic memberBitwiseOrCreates a database permission set by performing a bitwise OR operation on two DatabasePermission objects.
Public operatorStatic memberEqualityCompares two DatabasePermission objects in an equality operation.
Public operatorStatic memberImplicit(DatabasePermission to DatabasePermissionSet)Converts a single database permission object to a database permission set.
Public operatorStatic memberInequalityDetermines whether two DatabasePermission objects are not equal by performing an inequality operation.
Top

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft