Synonym.Deny Synonym.Deny Synonym.Deny Method

Definition

Denies the specified set of permissions for the specified grantees on the synonym.

Overloads

Deny(ObjectPermissionSet, String) Deny(ObjectPermissionSet, String) Deny(ObjectPermissionSet, String)

Denies the specified set of permissions for the specified grantee on the synonym.

Deny(ObjectPermissionSet, String[]) Deny(ObjectPermissionSet, String[]) Deny(ObjectPermissionSet, String[])

Denies the specified set of permissions for the specified grantees on the synonym.

Deny(ObjectPermissionSet, String, Boolean) Deny(ObjectPermissionSet, String, Boolean) Deny(ObjectPermissionSet, String, Boolean)

Denies the specified set of permissions for the specified grantee and other users that the grantee granted the specified set of permissions on the synonym.

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

Denies the specified set of permissions for the specified grantees and other users that the grantee granted the specified set of permissions on the synonym.

Deny(ObjectPermissionSet, String) Deny(ObjectPermissionSet, String) Deny(ObjectPermissionSet, String)

Denies the specified set of permissions for the specified grantee on the synonym.

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

An ObjectPermissionSet object value that specifies the set of permissions.

granteeName
String String String

A String value that specifies the grantee to be denied the specified set of permissions on the synonym.

Implements

Examples

Granting, Revoking, and Denying Permissions

Deny(ObjectPermissionSet, String[]) Deny(ObjectPermissionSet, String[]) Deny(ObjectPermissionSet, String[])

Denies the specified set of permissions for the specified grantees on the synonym.

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

An ObjectPermissionSet object value that specifies the set of permissions.

granteeNames
String[]

A String array that specifies a list of grantees to be denied the specified set of permissions on the synonym.

Implements

Examples

Using Synonyms

Deny(ObjectPermissionSet, String, Boolean) Deny(ObjectPermissionSet, String, Boolean) Deny(ObjectPermissionSet, String, Boolean)

Denies the specified set of permissions for the specified grantee and other users that the grantee granted the specified set of permissions on the synonym.

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

An ObjectPermissionSet object value that specifies the set of permissions.

granteeName
String String String

A String value that specifies the grantee to be denied the specified set of permissions on the synonym.

cascade
Boolean Boolean Boolean

A Boolean property that specifies whether users, to whom the grantee granted the specified set of permission, are also denied access to the specified set of permissions on the synonym.

If True, the grantee and users to which the grantee granted the specified set of permissions are all denied the specified set of permissions.

If False, only the grantee is denied the specified set of permissions.

Implements

Examples

Granting, Revoking, and Denying Permissions

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

Denies the specified set of permissions for the specified grantees and other users that the grantee granted the specified set of permissions on the synonym.

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

An ObjectPermissionSet object value that specifies the set of permissions.

granteeNames
String[]

A String array that specifies a list of grantees to be denied the specified set of permissions.

cascade
Boolean Boolean Boolean

A Boolean property that specifies whether users, to whom the grantee granted the specified set of permission, are also denied access to the specified set of permissions on the synonym.

If True, the grantee and users to which the grantee granted the specified set of permissions are all denied the specified set of permissions.

If False, only the grantee is denied the specified set of permissions.

Implements

Examples

Granting, Revoking, and Denying Permissions

Applies to