共用方式為


DatabasePermissionSet 類別

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

繼承階層

System.Object
  Microsoft.SqlServer.Management.Smo.PermissionSetBase
    Microsoft.SqlServer.Management.Smo.DatabasePermissionSet

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public NotInheritable Class DatabasePermissionSet _
    Inherits PermissionSetBase
'用途
Dim instance As DatabasePermissionSet
public sealed class DatabasePermissionSet : PermissionSetBase
public ref class DatabasePermissionSet sealed : public PermissionSetBase
[<SealedAttribute>]
type DatabasePermissionSet =  
    class 
        inherit PermissionSetBase 
    end
public final class DatabasePermissionSet extends PermissionSetBase

DatabasePermissionSet 型別公開下列成員。

建構函式

  名稱 說明
公用方法 DatabasePermissionSet() Initializes a new instance of the DatabasePermissionSet class.
公用方法 DatabasePermissionSet(DatabasePermission) Initializes a new instance of the DatabasePermissionSet class.
公用方法 DatabasePermissionSet(array<DatabasePermission[]) Initializes a new instance of the DatabasePermissionSet class.
公用方法 DatabasePermissionSet(DatabasePermissionSet) Initializes a new instance of the DatabasePermissionSet class.

上層

屬性

  名稱 說明
公用屬性 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 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 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 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 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 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 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 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 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 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.
公用屬性 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 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 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 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 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 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.
公用屬性 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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.

上層

方法

  名稱 說明
公用方法 Add(DatabasePermission) Returns a database permission set after adding a new a database permission to the referenced permission set.
公用方法靜態成員 Add(DatabasePermissionSet, DatabasePermission) Returns a database permission set after adding a new a database permission to the specified permission set.
公用方法 Equals Determines whether the referenced database permission object is equal to a specified object. (覆寫 PermissionSetBase.Equals(Object)。)
公用方法 GetHashCode This method supports the SQL Server infrastructure and is not intended to be used directly from your code. (覆寫 PermissionSetBase.GetHashCode()。)
公用方法 GetType (繼承自 Object。)
公用方法 Remove Removes a permission from the permission set.
公用方法靜態成員 Subtract Returns a database permission set after removing a database permission from the specified permission set.
公用方法 ToString Returns the string value that represents the specified PermissionSetBase object. (繼承自 PermissionSetBase。)

上層

運算子

  名稱 說明
公用運算子靜態成員 Addition Creates a database permission set by performing an addition operation on a DatabasePermission object and a DatabasePermissionSet object.
公用運算子靜態成員 Equality Determines whether two DatabasePermissionSet objects are equal.
公用運算子靜態成員 Inequality Determines whether two objects are unequal by performing an inequality operation on two DatabasePermissionSet objects.
公用運算子靜態成員 Subtraction Creates a database permission set by performing a subtraction operation on a DatabasePermission object and a DatabasePermissionSet object.

上層

備註

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

此型別的任何公用靜態 (在 Microsoft Visual Basic 為共用) 成員具備多執行緒作業安全。並非所有的執行個體成員都是安全執行緒。

範例

授與、撤銷和拒絕權限

執行緒安全性

這個型別的任何公用 static (在 Visual Basic 中為 Shared) 成員都是執行緒安全的。並不是所有的執行個體成員都保證可以用於所有的執行緒。

請參閱

參考

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

權限 (Database Engine)