Dela via


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.

Inheritance Hierarchy

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

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

Syntax

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

The DatabasePermission type exposes the following members.

Properties

  Name Description
Public propertyStatic member Alter Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyApplicationRole Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyAssembly Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyAsymmetricKey Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyCertificate Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyContract Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyDatabaseAudit Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyDatabaseDdlTrigger Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyDatabaseEventNotification Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyDataspace Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyFulltextCatalog Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyMessageType Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyRemoteServiceBinding Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyRole Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyRoute Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnySchema Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyService Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnySymmetricKey Gets a permission that can be included in the database permission set.
Public propertyStatic member AlterAnyUser Gets a permission that can be included in the database permission set.
Public propertyStatic member Authenticate Gets a permission that can be included in the database permission set.
Public propertyStatic member BackupDatabase Gets a permission that can be included in the database permission set.
Public propertyStatic member BackupLog Gets a permission that can be included in the database permission set.
Public propertyStatic member Checkpoint Gets a permission that can be included in the database permission set.
Public propertyStatic member Connect Gets a permission that can be included in the database permission set.
Public propertyStatic member ConnectReplication Gets a permission that can be included in the database permission set.
Public propertyStatic member Control Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateAggregate Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateAssembly Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateAsymmetricKey Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateCertificate Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateContract Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateDatabase Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateDatabaseDdlEventNotification Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateDefault Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateFulltextCatalog Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateFunction Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateMessageType Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateProcedure Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateQueue Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateRemoteServiceBinding Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateRole Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateRoute Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateRule Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateSchema Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateService Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateSymmetricKey Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateSynonym Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateTable Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateType Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateView Gets a permission that can be included in the database permission set.
Public propertyStatic member CreateXmlSchemaCollection Gets a permission that can be included in the database permission set.
Public propertyStatic member Delete Gets a permission that can be included in the database permission set.
Public propertyStatic member Execute Gets a permission that can be included in the database permission set.
Public propertyStatic member Insert Gets a permission that can be included in the database permission set.
Public propertyStatic member References Gets a permission that can be included in the database permission set.
Public propertyStatic member Select Gets a permission that can be included in the database permission set.
Public propertyStatic member Showplan Gets a permission that can be included in the database permission set.
Public propertyStatic member SubscribeQueryNotifications Gets a permission that can be included in the database permission set.
Public propertyStatic member TakeOwnership Gets a permission that can be included in the database permission set.
Public propertyStatic member Update Gets a permission that can be included in the database permission set.
Public propertyStatic member ViewDatabaseState Gets a permission that can be included in the database permission set.
Public propertyStatic member ViewDefinition Gets a permission that can be included in the database permission set.

Top

Methods

  Name Description
Public methodStatic member Add Returns a set of database permissions after adding a new database permission to an existing set of database permissions.
Public methodStatic member BitwiseOr Creates a database permission set by performing a bitwise OR operation on two DatabasePermission objects.
Public method Equals Determines whether the referenced database permission object is equal to a specified object. (Overrides Object.Equals(Object).)
Protected method Finalize (Inherited from Object.)
Public method GetHashCode This method supports the SQL Server infrastructure and is not intended to be used directly from your code. (Overrides Object.GetHashCode().)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public methodStatic member ToDatabasePermissionSet Returns a set of database permissions, based on a single database permission, by converting a DatabasePermission object to a DatabasePermissionSet object.
Public method ToString (Inherited from Object.)

Top

Operators

  Name Description
Public operatorStatic member Addition Creates a database permission set by performing an addition operation on two DatabasePermission objects.
Public operatorStatic member BitwiseOr Creates a database permission set by performing a bitwise OR operation on two DatabasePermission objects.
Public operatorStatic member Equality Compares two DatabasePermission objects in an equality operation.
Public operatorStatic member Implicit(DatabasePermission to DatabasePermissionSet) Converts a single database permission object to a database permission set.
Public operatorStatic member Inequality Determines whether two DatabasePermission objects are not equal by performing an inequality operation.

Top

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.

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.