DatabasePermissionSet DatabasePermissionSet DatabasePermissionSet Class

Definition

The DatabasePermissionSet object represents a SQL Server set of database permissions.

public ref class DatabasePermissionSet sealed : Microsoft::SqlServer::Management::Smo::PermissionSetBase
public sealed class DatabasePermissionSet : Microsoft.SqlServer.Management.Smo.PermissionSetBase
Public NotInheritable Class DatabasePermissionSet
Inherits PermissionSetBase
Inheritance
DatabasePermissionSetDatabasePermissionSetDatabasePermissionSet

Examples

Granting, Revoking, and Denying Permissions

Remarks

Database permissions are required when running granting, denying, or revoking permissions on a database. The DatabasePermissionSet object is required to specify the set of permissions that apply to the Grant method, the Deny method, and the Revoke method of the Database object.

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.

Constructors

DatabasePermissionSet() DatabasePermissionSet() DatabasePermissionSet()

Initializes a new instance of the DatabasePermissionSet class.

DatabasePermissionSet(DatabasePermission) DatabasePermissionSet(DatabasePermission) DatabasePermissionSet(DatabasePermission)

Initializes a new instance of the DatabasePermissionSet class.

DatabasePermissionSet(DatabasePermissionSet) DatabasePermissionSet(DatabasePermissionSet) DatabasePermissionSet(DatabasePermissionSet)

Initializes a new instance of the DatabasePermissionSet class.

DatabasePermissionSet(DatabasePermission[]) DatabasePermissionSet(DatabasePermission[]) DatabasePermissionSet(DatabasePermission[])

Initializes a new instance of the DatabasePermissionSet class.

Properties

Alter Alter Alter

Gets or sets the Boolean property value that specifies whether to include the ALTER permission in the permission set. This permission lets the grantee change the properties of the database, except ownership, and create, alter, or drop any child objects.

AlterAnyApplicationRole AlterAnyApplicationRole AlterAnyApplicationRole

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY APPLICATION ROLE permission in the permission set. This permission lets the grantee change the properties of any application role in the database, except ownership.

AlterAnyAssembly AlterAnyAssembly AlterAnyAssembly

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY ASSEMBLY permission in the permission set. This permission lets the grantee change the properties of any assembly in the database, except ownership.

AlterAnyAsymmetricKey AlterAnyAsymmetricKey AlterAnyAsymmetricKey

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY ASYMMETRIC KEY permission in the permission set. This permission lets the grantee change the properties of any asymmetric key in the database, except ownership.

AlterAnyCertificate AlterAnyCertificate AlterAnyCertificate

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY CERTIFICATE permission in the permission set. This permission lets the grantee change the properties of any in the certificate in the database, except ownership.

AlterAnyContract AlterAnyContract AlterAnyContract

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY CONTRACT permission in the permission set. This permission lets the grantee change the properties of any Service Broker contract in the database, except ownership.

AlterAnyDatabaseAudit AlterAnyDatabaseAudit AlterAnyDatabaseAudit

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY DATABASE AUDIT permission in the permission set. This permission lets the grantee change modify the database audit objects.

AlterAnyDatabaseDdlTrigger AlterAnyDatabaseDdlTrigger AlterAnyDatabaseDdlTrigger

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY DATABASE DDL TRIGGER permission in the permission set. This permission lets the grantee change the properties of any database DDL trigger in the database, except ownership.

AlterAnyDatabaseEventNotification AlterAnyDatabaseEventNotification AlterAnyDatabaseEventNotification

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY DATABASE EVENT NOTIFICATION permission in the permission set. This permission lets the grantee change the properties of any database event notification in the database, except ownership.

AlterAnyDataspace AlterAnyDataspace AlterAnyDataspace

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY DATASPACE permission in the permission set. This permission lets the grantee change modify the database files.

AlterAnyExternalDataSource AlterAnyExternalDataSource AlterAnyExternalDataSource

Gets or sets a value that indicates whether the database alters any external data source.

AlterAnyExternalFileFormat AlterAnyExternalFileFormat AlterAnyExternalFileFormat

Gets or sets a value that indicates whether the database alters any external file format.

AlterAnyFulltextCatalog AlterAnyFulltextCatalog AlterAnyFulltextCatalog

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY FULL TEXT CATALOG permission in the permission set. This permission lets the grantee change the properties of any Full Text catalog in the database, except ownership.

AlterAnyMessageType AlterAnyMessageType AlterAnyMessageType

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY MESSAGE TYPE permission in the permission set. This permission lets the grantee change the properties of any message type in the database, except ownership.

AlterAnyRemoteServiceBinding AlterAnyRemoteServiceBinding AlterAnyRemoteServiceBinding

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY REMOTE SERVICE BINDING permission in the permission set. This permission lets the grantee change the properties of any remote service binding in the database, except ownership.

AlterAnyRole AlterAnyRole AlterAnyRole

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY ROLE permission in the permission set. This permission lets the grantee change the properties of any role in the database, except ownership.

AlterAnyRoute AlterAnyRoute AlterAnyRoute

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY ROUTE permission in the permission set. This permission lets the grantee change the properties of any Service Broker route in the database, except ownership.

AlterAnySchema AlterAnySchema AlterAnySchema

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY SCHEMA permission in the permission set. This permission lets the grantee change the properties of any schema in the database, except ownership.

AlterAnySecurityPolicy AlterAnySecurityPolicy AlterAnySecurityPolicy

Gets or sets a value that indicates whether the database permission set alters any security policy.

AlterAnyService AlterAnyService AlterAnyService

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY SERVICE permission in the permission set. This permission lets the grantee change the properties of any Service Broker service in the database, except ownership.

AlterAnySymmetricKey AlterAnySymmetricKey AlterAnySymmetricKey

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY SYMMETRIC KEY permission in the permission set. This permission lets the grantee change the properties of any symmetric key in the database, except ownership.

AlterAnyUser AlterAnyUser AlterAnyUser

Gets or sets the Boolean property value that specifies whether to include the ALTER ANY USER permission in the permission set. This permission lets the grantee change the properties of any user in the database, except ownership.

Authenticate Authenticate Authenticate

Gets or sets the Boolean property value that specifies whether to include the AUTHENTICATE permission in the permission set. This permission lets the grantee authenticate the database.

BackupDatabase BackupDatabase BackupDatabase

Gets or sets the Boolean property value that specifies whether to include the BACKUP DATABASE permission in the permission set. This permission lets the grantee create a backup of the database.

BackupLog BackupLog BackupLog

Gets or sets the Boolean property value that specifies whether to include the BACKUP LOG permission in the permission set. This permission lets the grantee create a backup of the transaction log.

Checkpoint Checkpoint Checkpoint

Gets or sets the Boolean property value that specifies whether to include the CHECKPOINT permission in the permission set. This permission lets the grantee issue a checkpoint on the database.

Connect Connect Connect

Gets or sets the Boolean property value that specifies whether to include the CONNECT permission in the permission set. This permission lets the grantee connect to the database.

ConnectReplication ConnectReplication ConnectReplication

Gets or sets the Boolean property value that specifies whether to include the CONNECT REPLICATION permission in the permission set. This permission lets the grantee connect to replication databases.

Control Control Control

Gets or sets the Boolean property value that specifies whether to include the CONTROL permission in the permission set. This permission gives the grantee full control over the database, which includes every database permission.

CreateAggregate CreateAggregate CreateAggregate

Gets or sets the Boolean property value that specifies whether to include the CREATE AGGREGATE permission in the permission set. This permission lets the grantee create an aggregate in the database.

CreateAssembly CreateAssembly CreateAssembly

Gets or sets the Boolean property value that specifies whether to include the CREATE ASSEMBLY permission in the permission set. This permission lets the grantee create an assembly in the database.

CreateAsymmetricKey CreateAsymmetricKey CreateAsymmetricKey

Gets or sets the Boolean property value that specifies whether to include the CREATE ASYMMETRIC KEY permission in the permission set. This permission lets the grantee create an asymmetric key.

CreateCertificate CreateCertificate CreateCertificate

Gets or sets the Boolean property value that specifies whether to include the CREATE CERTIFICATE permission in the permission set. This permission lets the grantee create a certificate in the database.

CreateContract CreateContract CreateContract

Gets or sets the Boolean property value that specifies whether to include the CREATE CONTRACT permission in the permission set. This permission lets the grantee create a Service Broker contract.

CreateDatabase CreateDatabase CreateDatabase

Gets or sets the Boolean property value that specifies whether to include the CREATE DATABASE permission in the permission set. This permission lets the grantee create the database.

CreateDatabaseDdlEventNotification CreateDatabaseDdlEventNotification CreateDatabaseDdlEventNotification

Gets or sets the Boolean property value that specifies whether to include the CREATE DATABASE DDL EVENT NOTIFICATION permission in the permission set. This permission lets the grantee create a database DDL event notification.

CreateDefault CreateDefault CreateDefault

Gets or sets the Boolean property value that specifies whether to include the CREATE DEFAULT permission in the permission set. This permission lets the grantee create a default in the database.

CreateFulltextCatalog CreateFulltextCatalog CreateFulltextCatalog

Gets or sets the Boolean property value that specifies whether to include the CREATE FULL TEXT CATALOG permission in the permission set. This permission lets the grantee create a Full Text catalog in the database.

CreateFunction CreateFunction CreateFunction

Gets or sets the Boolean property value that specifies whether to include the CREATE FUNCTION permission in the permission set. This permission lets the grantee create a function in the database.

CreateMessageType CreateMessageType CreateMessageType

Gets or sets the Boolean property value that specifies whether to include the CREATE MESSAGE TYPE permission in the permission set. This permission lets the grantee create a message type in the database.

CreateProcedure CreateProcedure CreateProcedure

Gets or sets the Boolean property value that specifies whether to include the CREATE PROCEDURE permission in the permission set. This permission lets the grantee create a stored procedure in the database.

CreateQueue CreateQueue CreateQueue

Gets or sets the Boolean property value that specifies whether to include the CREATE QUEUE permission in the permission set. This permission lets the grantee create a Service Broker queue in the database.

CreateRemoteServiceBinding CreateRemoteServiceBinding CreateRemoteServiceBinding

Gets or sets the Boolean property value that specifies whether to include the CREATE REMOTE SERVICE BINDING permission in the permission set. This permission lets the grantee create a remote service binding in the database.

CreateRole CreateRole CreateRole

Gets or sets the Boolean property value that specifies whether to include the CREATE ROLE permission in the permission set. This permission lets the grantee create a database role.

CreateRoute CreateRoute CreateRoute

Gets or sets the Boolean property value that specifies whether to include the CREATE ROUTE permission in the permission set. This permission lets the grantee create a Service Broker route in the database.

CreateRule CreateRule CreateRule

Gets or sets the Boolean property value that specifies whether to include the CREATE RULE permission in the permission set. This permission lets the grantee create a rule in the database.

CreateSchema CreateSchema CreateSchema

Gets or sets the Boolean property value that specifies whether to include the CREATE SCHEMA permission in the permission set. This permission lets the grantee create a schema in the database.

CreateService CreateService CreateService

Gets or sets the Boolean property value that specifies whether to include the CREATE SERVICE permission in the permission set. This permission lets the grantee create a Service Broker service in the database.

CreateSymmetricKey CreateSymmetricKey CreateSymmetricKey

Gets or sets the Boolean property value that specifies whether to include the CREATE SYMMETRIC KEY permission in the permission set. This permission lets the grantee create a symmetric key in the database.

CreateSynonym CreateSynonym CreateSynonym

Gets or sets the Boolean property value that specifies whether to include the CREATE SYNONYM permission in the permission set. This permission lets the grantee create a synonym in the database.

CreateTable CreateTable CreateTable

Gets or sets the Boolean property value that specifies whether to include the CREATE TABLE permission in the permission set. This permission lets the grantee create a table in the database.

CreateType CreateType CreateType

Gets or sets the Boolean property value that specifies whether to include the CREATE TYPE permission in the permission set. This permission lets the grantee create a type in the database.

CreateView CreateView CreateView

Gets or sets the Boolean property value that specifies whether to include the CREATE VIEW permission in the permission set. This permission lets the grantee create a view in the database.

CreateXmlSchemaCollection CreateXmlSchemaCollection CreateXmlSchemaCollection

Gets or sets the Boolean property value that specifies whether to include the CREATE XML SCHEMA COLLECTION permission in the permission set. This permission lets the grantee create an XML schema collection in the database.

Delete Delete Delete

Gets or sets the Boolean property value that specifies whether to include the DELETE permission in the permission set. This permission lets the grantee remove data from the database.

Execute Execute Execute

Gets or sets the Boolean property value that specifies whether to include the EXECUTE permission in the permission set. This permission lets the grantee execute stored procedures and functions in the database.

Insert Insert Insert

Gets or sets the Boolean property value that specifies whether to include the INSERT permission in the permission set. This permission lets the grantee add data to the database.

References References References

Gets or sets the Boolean property value that specifies whether to include the REFERENCES permission in the permission set. This permission lets the grantee reference the database.

Select Select Select

Gets or sets the Boolean property value that specifies whether to include the SELECT permission in the permission set. This permission lets the grantee retrieve data in the database.

Showplan Showplan Showplan

Gets or sets the Boolean property value that specifies whether to include the SHOWPLAN permission in the permission set. This permission lets the grantee view the execution plan for stored procedures in the database.

SubscribeQueryNotifications SubscribeQueryNotifications SubscribeQueryNotifications

Gets or sets the Boolean property value that specifies whether to include the SUBSCRIBE QUERY NOTIFICATIONS permission in the permission set. This permission lets the grantee subscribe to Service Broker query notifications.

TakeOwnership TakeOwnership TakeOwnership

Gets or sets the Boolean property value that specifies whether to include the TAKE OWNERSHIP permission in the permission set. This permission lets the grantee take ownership of the database.

Update Update Update

Gets or sets the Boolean property value that specifies whether to include the UPDATE permission in the permission set. This permission lets the grantee update the data in the database.

ViewDatabaseState ViewDatabaseState ViewDatabaseState

Gets or sets the Boolean property value that specifies whether to include the VIEW DATABASE STATE permission in the permission set. This permission lets the grantee view the state of the database.

ViewDefinition ViewDefinition ViewDefinition

Gets or sets the Boolean property value that specifies whether to include the VIEW DEFINITION permission in the permission set. This permission lets the grantee view the metadata that defines the database.

Methods

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

Returns a database permission set after adding a new a database permission to the referenced permission set.

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

Returns a database permission set after adding a new a database permission to the specified permission set.

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.

Remove(DatabasePermission) Remove(DatabasePermission) Remove(DatabasePermission)

Removes a permission from the permission set.

Subtract(DatabasePermissionSet, DatabasePermission) Subtract(DatabasePermissionSet, DatabasePermission) Subtract(DatabasePermissionSet, DatabasePermission)

Returns a database permission set after removing a database permission from the specified permission set.

ToString() ToString() ToString()

Returns the string value that represents the specified PermissionSetBase object.

(Inherited from PermissionSetBase)

Operators

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

Creates a database permission set by performing an addition operation on a DatabasePermission object and a DatabasePermissionSet object.

Equality(DatabasePermissionSet, DatabasePermissionSet) Equality(DatabasePermissionSet, DatabasePermissionSet) Equality(DatabasePermissionSet, DatabasePermissionSet)

Determines whether two DatabasePermissionSet objects are equal.

Inequality(DatabasePermissionSet, DatabasePermissionSet) Inequality(DatabasePermissionSet, DatabasePermissionSet) Inequality(DatabasePermissionSet, DatabasePermissionSet)

Determines whether two objects are unequal by performing an inequality operation on two DatabasePermissionSet objects.

Subtraction(DatabasePermissionSet, DatabasePermission) Subtraction(DatabasePermissionSet, DatabasePermission) Subtraction(DatabasePermissionSet, DatabasePermission)

Creates a database permission set by performing a subtraction operation on a DatabasePermission object and a DatabasePermissionSet object.

Applies to