User.Revoke User.Revoke User.Revoke Method

Definition

Revokes previously granted permissions from a grantee or grantees on the database user.

Overloads

Revoke(ObjectPermissionSet, String) Revoke(ObjectPermissionSet, String) Revoke(ObjectPermissionSet, String)

Revokes previously granted permissions from a grantee on the database user.

Revoke(ObjectPermissionSet, String[]) Revoke(ObjectPermissionSet, String[]) Revoke(ObjectPermissionSet, String[])

Revokes previously granted permissions from a list of grantees on the database user.

Revoke(ObjectPermissionSet, String, Boolean, Boolean) Revoke(ObjectPermissionSet, String, Boolean, Boolean) Revoke(ObjectPermissionSet, String, Boolean, Boolean)

Revokes previously granted permissions from a grantee on the database user and any other users to whom the grantee has granted access. The grantee is also given the ability to revoke other users' access.

Revoke(ObjectPermissionSet, String[], Boolean, Boolean) Revoke(ObjectPermissionSet, String[], Boolean, Boolean) Revoke(ObjectPermissionSet, String[], Boolean, Boolean)

Revokes previously granted permissions from the grantees on the database user and any other users to whom the grantees have granted access. The grantees are also given the ability to revoke other users' access.

Revoke(ObjectPermissionSet, String, Boolean, Boolean, String) Revoke(ObjectPermissionSet, String, Boolean, Boolean, String) Revoke(ObjectPermissionSet, String, Boolean, Boolean, String)

Revokes previously granted permissions from a grantee on the database user and any other users to whom the grantee has granted access. The grantee is also given the ability to revoke other users' access under an assumed role.

Revoke(ObjectPermissionSet, String[], Boolean, Boolean, String) Revoke(ObjectPermissionSet, String[], Boolean, Boolean, String) Revoke(ObjectPermissionSet, String[], Boolean, Boolean, String)

Revokes previously granted permissions from grantees on the database user and any other users to whom the grantees have granted access. The grantees are also given the ability to revoke other users' access under an assumed role.

Revoke(ObjectPermissionSet, String) Revoke(ObjectPermissionSet, String) Revoke(ObjectPermissionSet, String)

Revokes previously granted permissions from a grantee on the database user.

public:
 virtual void Revoke(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, System::String ^ granteeName);
public void Revoke (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string granteeName);
Public Sub Revoke (permission As ObjectPermissionSet, granteeName As String)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeName
String String String

A String value that specifies a grantee to be revoked access to the permission.

Implements

Examples

Granting, Revoking, and Denying Permissions

Revoke(ObjectPermissionSet, String[]) Revoke(ObjectPermissionSet, String[]) Revoke(ObjectPermissionSet, String[])

Revokes previously granted permissions from a list of grantees on the database user.

public:
 virtual void Revoke(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, cli::array <System::String ^> ^ granteeNames);
public void Revoke (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string[] granteeNames);
Public Sub Revoke (permission As ObjectPermissionSet, granteeNames As String())
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeNames
String[]

A String array that specifies a list of grantees to be revoked access to the permission.

Implements

Examples

Granting, Revoking, and Denying Permissions

Revoke(ObjectPermissionSet, String, Boolean, Boolean) Revoke(ObjectPermissionSet, String, Boolean, Boolean) Revoke(ObjectPermissionSet, String, Boolean, Boolean)

Revokes previously granted permissions from a grantee on the database user and any other users to whom the grantee has granted access. The grantee is also given the ability to revoke other users' access.

public:
 void Revoke(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, System::String ^ granteeName, bool revokeGrant, bool cascade);
public void Revoke (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string granteeName, bool revokeGrant, bool cascade);
Public Sub Revoke (permission As ObjectPermissionSet, granteeName As String, revokeGrant As Boolean, cascade As Boolean)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeName
String String String

A String value that specifies a grantee to be revoked access to the permission.

revokeGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to revoke access from the User object for other users.

If True, the grantee is given the ability to revoke other users' access from the database user.

If False, the grantee is not given the ability to revoke other users' access from the database user.

cascade
Boolean Boolean Boolean

A Boolean property that specifies whether users that the grantee has granted access to the permission are also revoked access from the permission.

If True, the grantee and users to which the grantee granted access to the permission are all revoked access from the permission.

If False, only the grantee is revoked access from the permission.

Examples

Granting, Revoking, and Denying Permissions

Revoke(ObjectPermissionSet, String[], Boolean, Boolean) Revoke(ObjectPermissionSet, String[], Boolean, Boolean) Revoke(ObjectPermissionSet, String[], Boolean, Boolean)

Revokes previously granted permissions from the grantees on the database user and any other users to whom the grantees have granted access. The grantees are also given the ability to revoke other users' access.

public:
 virtual void Revoke(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, cli::array <System::String ^> ^ granteeNames, bool revokeGrant, bool cascade);
public void Revoke (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string[] granteeNames, bool revokeGrant, bool cascade);
Public Sub Revoke (permission As ObjectPermissionSet, granteeNames As String(), revokeGrant As Boolean, cascade As Boolean)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeNames
String[]

A String array that specifies a list of grantees to be revoked access to the permission.

revokeGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to revoke access from the User object for other users.

If True, the grantee is given the ability to revoke other users' access from the database user.

If False, the grantee is not given the ability to revoke other users' access from the database user.

cascade
Boolean Boolean Boolean

A Boolean property that specifies whether users that the grantee has granted access to the permission are also revoked access from the permission.

If True, the grantee and users to which the grantee granted access to the permission are all revoked access from the permission.

If False, only the grantee is revoked access from the permission.

Implements

Examples

Granting, Revoking, and Denying Permissions

Revoke(ObjectPermissionSet, String, Boolean, Boolean, String) Revoke(ObjectPermissionSet, String, Boolean, Boolean, String) Revoke(ObjectPermissionSet, String, Boolean, Boolean, String)

Revokes previously granted permissions from a grantee on the database user and any other users to whom the grantee has granted access. The grantee is also given the ability to revoke other users' access under an assumed role.

public:
 virtual void Revoke(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, System::String ^ granteeName, bool revokeGrant, bool cascade, System::String ^ asRole);
public void Revoke (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string granteeName, bool revokeGrant, bool cascade, string asRole);
Public Sub Revoke (permission As ObjectPermissionSet, granteeName As String, revokeGrant As Boolean, cascade As Boolean, asRole As String)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeName
String String String

A String value that specifies a grantee to be revoked access to the permission.

revokeGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to revoke access from the User object for other users.

If True, the grantee is given the ability to revoke other users' access from the database user.

If False, the grantee is not given the ability to revoke other users' access from the database user.

cascade
Boolean Boolean Boolean

A Boolean property that specifies whether users that the grantee has granted access to the permission are also revoked access from the permission.

If True, the grantee and users to which the grantee granted access to the permission are all revoked access from the permission.

If False, only the grantee is revoked access from the permission.

asRole
String String String

A String value that specifies the role that the user assumes when revoking access from the database user for other users. Use this parameter for grantees who are members of more than one role.

Implements

Examples

Granting, Revoking, and Denying Permissions

Revoke(ObjectPermissionSet, String[], Boolean, Boolean, String) Revoke(ObjectPermissionSet, String[], Boolean, Boolean, String) Revoke(ObjectPermissionSet, String[], Boolean, Boolean, String)

Revokes previously granted permissions from grantees on the database user and any other users to whom the grantees have granted access. The grantees are also given the ability to revoke other users' access under an assumed role.

public:
 void Revoke(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permission, cli::array <System::String ^> ^ granteeNames, bool revokeGrant, bool cascade, System::String ^ asRole);
public void Revoke (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permission, string[] granteeNames, bool revokeGrant, bool cascade, string asRole);
Public Sub Revoke (permission As ObjectPermissionSet, granteeNames As String(), revokeGrant As Boolean, cascade As Boolean, asRole As String)
Parameters
permission
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeNames
String[]

A String array that specifies a list of grantees to be revoked access to the permission.

revokeGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to revoke access from the User object for other users.

If True, the grantee is given the ability to revoke other users' access from the database user.

If False, the grantee is not given the ability to revoke other users' access from the database user.

cascade
Boolean Boolean Boolean

A Boolean property that specifies whether users that the grantee has granted access to the permission are also revoked access from the permission.

If True, the grantee and users to which the grantee granted access to the permission are all revoked access from the permission.

If False, only the grantee is revoked access from the permission.

asRole
String String String

A String value that specifies the role that the user assumes when revoking access from the database user for other users. Use this parameter for grantees who are members of more than one role.

Examples

Granting, Revoking, and Denying Permissions

Applies to