共用方式為


DatabasePermission 類別

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

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

語法

'宣告
Public NotInheritable Class DatabasePermission
'用途
Dim instance As DatabasePermission
public sealed class DatabasePermission
public ref class DatabasePermission sealed
[<SealedAttribute>]
type DatabasePermission =  class end
public final class DatabasePermission

DatabasePermission 型別公開下列成員。

屬性

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

上層

方法

  名稱 說明
公用方法靜態成員 Add Returns a set of database permissions after adding a new database permission to an existing set of database permissions.
公用方法靜態成員 BitwiseOr Creates a database permission set by performing a bitwise OR operation on two DatabasePermission objects.
公用方法 Equals Determines whether the referenced database permission object is equal to a specified object. (覆寫 Object.Equals(Object)。)
公用方法 GetHashCode This method supports the SQL Server infrastructure and is not intended to be used directly from your code. (覆寫 Object.GetHashCode()。)
公用方法 GetType (繼承自 Object。)
公用方法靜態成員 ToDatabasePermissionSet Returns a set of database permissions, based on a single database permission, by converting a DatabasePermission object to a DatabasePermissionSet object.
公用方法 ToString (繼承自 Object。)

上層

運算子

  名稱 說明
公用運算子靜態成員 Addition Creates a database permission set by performing an addition operation on two DatabasePermission objects.
公用運算子靜態成員 BitwiseOr Creates a database permission set by performing a bitwise OR operation on two DatabasePermission objects.
公用運算子靜態成員 Equality Compares two DatabasePermission objects in an equality operation.
公用運算子靜態成員 Implicit(DatabasePermission to DatabasePermissionSet) Converts a single database permission object to a database permission set.
公用運算子靜態成員 Inequality Determines whether two DatabasePermission objects are not equal by performing an inequality operation.

上層

備註

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

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

範例

授與、撤銷和拒絕權限

執行緒安全性

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

請參閱

參考

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

權限 (Database Engine)