ObjectPermissionSet 类

The ObjectPermissionSet object represents a set of object permissions in Microsoft SQL Server.

继承层次结构

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

命名空间:  Microsoft.SqlServer.Management.Smo
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
Public NotInheritable Class ObjectPermissionSet _
    Inherits PermissionSetBase
用法
Dim instance As ObjectPermissionSet
public sealed class ObjectPermissionSet : PermissionSetBase
public ref class ObjectPermissionSet sealed : public PermissionSetBase
[<SealedAttribute>]
type ObjectPermissionSet =  
    class 
        inherit PermissionSetBase 
    end
public final class ObjectPermissionSet extends PermissionSetBase

ObjectPermissionSet 类型公开以下成员。

构造函数

  名称 说明
公共方法 ObjectPermissionSet() Initializes a new instance of the ObjectPermissionSet class.
公共方法 ObjectPermissionSet(ObjectPermission) Initializes a new instance of the ObjectPermissionSet class based on the specified object permission.
公共方法 ObjectPermissionSet(array<ObjectPermission[]) Initializes a new instance of the ObjectPermissionSet class based on the specified set of object permissions.
公共方法 ObjectPermissionSet(ObjectPermissionSet) Initializes a new instance of the ObjectPermissionSet class based on the specified set of object permissions.

页首

属性

  名称 说明
公共属性 Alter Gets or sets the Boolean property value that specifies whether to include the ALTER permission in the permission set. The permission lets the grantee change properties, except ownership, of the object.
公共属性 Connect Gets or sets the Boolean property value that specifies whether to include the CONNECT permission in the permission set. The permission lets the grantee create a connection between the object and an instance of SQL Server.
公共属性 Control Gets or sets the Boolean property value that specifies whether to include the CONTROL permission in the permission set. The permission gives the grantee full control over the object, including all defined permissions for the object, the ability to create permissions on the object, and full control over child objects.
公共属性 CreateSequence Gets or sets the Boolean property value that specifies whether to include the CREATE SEQUENCE permission in the permission set. This permission gives the grantee the ability to create a sequence within the database.
公共属性 Delete Gets or sets the Boolean property value that specifies whether to include the DELETE permission in the permission set. The permission lets the grantee delete the object.
公共属性 Execute Gets or sets the Boolean property value that specifies whether to include the EXECUTE permission in the permission set. The permission lets the grantee execute the object.
公共属性 Impersonate Gets or sets the Boolean property value that specifies whether to include the IMPERSONATE permission in the permission set. The permission lets the grantee impersonate the user or the login.
公共属性 Insert Gets or sets the Boolean property value that specifies whether to include the INSERT permission in the permission set. The permission lets the grantee insert data into the object.
公共属性 Receive Gets or sets the Boolean property value that specifies whether to include the RECEIVE permission in the permission set. The permission lets the grantee receive messages from a Service Broker queue.
公共属性 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 data in the object.
公共属性 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 from the object.
公共属性 Send Gets or sets the Boolean property value that specifies whether to include the SEND permission in the permission set. This permission lets the grantee send messages to a Service Broker service.
公共属性 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 object.
公共属性 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 modify data in the object.
公共属性 ViewChangeTracking Gets or sets the Boolean property value that specifies whether to include the VIEW CHANGE TRACKING permission in the permission set. This permission lets the grantee view the tracking information for a database object.
公共属性 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 object.

页首

方法

  名称 说明
公共方法 Add(ObjectPermission) Returns an object permission set after adding a new object permission to the referenced permission set.
公共方法静态成员 Add(ObjectPermissionSet, ObjectPermission) Returns an object permission set after adding a new object permission to the referenced permission set.
公共方法 Equals Determines whether the current ObjectPermissionSet 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 Creates an object permission set by performing a subtraction operation on an IObjectPermission object and an ObjectPermissionSet object.
公共方法 ToString Returns the string value that represents the specified PermissionSetBase object. (从 PermissionSetBase 继承。)

页首

运算符

  名称 说明
公共运算符静态成员 Addition Creates an object permission set by performing an addition operation on an ObjectPermission object and an ObjectPermissionSet object.
公共运算符静态成员 Equality Determines whether two objects are equal by performing an equality operation on two ObjectPermissionSet objects.
公共运算符静态成员 Inequality Determines whether two objects are unequal by performing an inequality operation on two ObjectPermissionSet objects.
公共运算符静态成员 Subtraction Creates an object permission set by performing a subtraction operation on an IObjectPermission object and an ObjectPermissionSet object.

页首

注释

Object permissions are required when granting, denying, or revoking permissions on an object. The ObjectPermissionSet object is required to specify the set of permissions that apply to the Grant method, the Deny method, and the Revoke method of the object.

Thread Safety

此类型的任何公共静态(Microsoft Visual Basic 中的 Shared)成员在多线程操作中是安全的。但不保证所有实例成员都是线程安全的。

示例

授予、撤消和拒绝权限

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。不保证所有实例成员都是线程安全的。

请参阅

参考

Microsoft.SqlServer.Management.Smo 命名空间