ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet Class

Definition

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

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

Examples

Granting, Revoking, and Denying Permissions

Remarks

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

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

ObjectPermissionSet() ObjectPermissionSet() ObjectPermissionSet()

Initializes a new instance of the ObjectPermissionSet class.

ObjectPermissionSet(ObjectPermission) ObjectPermissionSet(ObjectPermission) ObjectPermissionSet(ObjectPermission)

Initializes a new instance of the ObjectPermissionSet class based on the specified object permission.

ObjectPermissionSet(ObjectPermissionSet) ObjectPermissionSet(ObjectPermissionSet) ObjectPermissionSet(ObjectPermissionSet)

Initializes a new instance of the ObjectPermissionSet class based on the specified set of object permissions.

ObjectPermissionSet(ObjectPermission[]) ObjectPermissionSet(ObjectPermission[]) ObjectPermissionSet(ObjectPermission[])

Initializes a new instance of the ObjectPermissionSet class based on the specified set of object permissions.

Properties

Alter Alter 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 Connect 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 Control 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 CreateSequence 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 Delete 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 Execute 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 Impersonate 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 Insert 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 Receive 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 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 data in the object.

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 from the object.

Send Send 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 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 object.

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 modify data in the object.

ViewChangeTracking ViewChangeTracking 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 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 object.

Methods

Add(ObjectPermission) Add(ObjectPermission) Add(ObjectPermission)

Returns an object permission set after adding a new object permission to the referenced permission set.

Add(ObjectPermissionSet, ObjectPermission) Add(ObjectPermissionSet, ObjectPermission) Add(ObjectPermissionSet, ObjectPermission)

Returns an object permission set after adding a new object permission to the referenced permission set.

Equals(Object) Equals(Object) Equals(Object)

Determines whether the current ObjectPermissionSet 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(ObjectPermission) Remove(ObjectPermission) Remove(ObjectPermission)

Removes a permission from the permission set.

Subtract(ObjectPermissionSet, ObjectPermission) Subtract(ObjectPermissionSet, ObjectPermission) Subtract(ObjectPermissionSet, ObjectPermission)

Creates an object permission set by performing a subtraction operation on an IObjectPermission object and an ObjectPermissionSet object.

ToString() ToString() ToString()

Returns the string value that represents the specified PermissionSetBase object.

(Inherited from PermissionSetBase)

Operators

Addition(ObjectPermissionSet, ObjectPermission) Addition(ObjectPermissionSet, ObjectPermission) Addition(ObjectPermissionSet, ObjectPermission)

Creates an object permission set by performing an addition operation on an ObjectPermission object and an ObjectPermissionSet object.

Equality(ObjectPermissionSet, ObjectPermissionSet) Equality(ObjectPermissionSet, ObjectPermissionSet) Equality(ObjectPermissionSet, ObjectPermissionSet)

Determines whether two objects are equal by performing an equality operation on two ObjectPermissionSet objects.

Inequality(ObjectPermissionSet, ObjectPermissionSet) Inequality(ObjectPermissionSet, ObjectPermissionSet) Inequality(ObjectPermissionSet, ObjectPermissionSet)

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

Subtraction(ObjectPermissionSet, ObjectPermission) Subtraction(ObjectPermissionSet, ObjectPermission) Subtraction(ObjectPermissionSet, ObjectPermission)

Creates an object permission set by performing a subtraction operation on an IObjectPermission object and an ObjectPermissionSet object.

Applies to