IColumnPermission.Grant IColumnPermission.Grant IColumnPermission.Grant Method

Definition

Grants access to the specified permission for the specified grantees on the referenced columns.

Overloads

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

Grants access to the specified set of permissions and the ability to grant access to other users for the specified grantees on the referenced columns under an assumed role.

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

Grants access to the specified set of permissions and the ability to grant access to other users for the specified grantee on the referenced columns under an assumed role.

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

Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the referenced columns.

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

Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the referenced columns.

Grant(ObjectPermissionSet, String[], String[]) Grant(ObjectPermissionSet, String[], String[]) Grant(ObjectPermissionSet, String[], String[])

Grants access to the specified permission for the specified grantees on the stored procedure.

Grant(ObjectPermissionSet, String, String[]) Grant(ObjectPermissionSet, String, String[]) Grant(ObjectPermissionSet, String, String[])

Grants access to the specified permission for the specified grantee on the referenced list of columns.

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

Grants access to the specified set of permissions and the ability to grant access to other users for the specified grantees on the referenced columns under an assumed role.

public:
 void Grant(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permissions, cli::array <System::String ^> ^ granteeNames, cli::array <System::String ^> ^ columnNames, bool grantGrant, System::String ^ asRole);
public void Grant (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permissions, string[] granteeNames, string[] columnNames, bool grantGrant, string asRole);
Public Sub Grant (permissions As ObjectPermissionSet, granteeNames As String(), columnNames As String(), grantGrant As Boolean, asRole As String)
Parameters
permissions
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the set of permissions.

granteeNames
String[]

A String array value that specifies a list of grantees to be granted access to the set of permissions.

columnNames
String[]

A String array that specifies the names of the columns to which the permission is granted.

grantGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to grant access to the referenced columns for other users.

If True, the grantee is given the ability to grant other users access to the referenced columns.

If False, the grantee is not given the ability to grant other users access to the referenced columns.

asRole
String String String

A String value that specifies the role that the user assumes when granting access to the referenced columns to other users. Use this parameter for grantees who are members of more than one role.

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

Grants access to the specified set of permissions and the ability to grant access to other users for the specified grantee on the referenced columns under an assumed role.

public:
 void Grant(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permissions, System::String ^ granteeName, cli::array <System::String ^> ^ columnNames, bool grantGrant, System::String ^ asRole);
public void Grant (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permissions, string granteeName, string[] columnNames, bool grantGrant, string asRole);
Public Sub Grant (permissions As ObjectPermissionSet, granteeName As String, columnNames As String(), grantGrant As Boolean, asRole As String)
Parameters
permissions
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the set of permissions.

granteeName
String String String

A String value that specifies a grantee to be granted access to the set of permissions.

columnNames
String[]

A String array that specifies the names of the columns to which the permission is granted.

grantGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to grant access to the referenced columns for other users.

If True, the grantee is given the ability to grant other users access to the referenced columns.

If False, the grantee is not given the ability to grant other users access to the referenced columns.

asRole
String String String

A String value that specifies the role that the user assumes when granting access to the referenced columns to other users. Use this parameter for grantees who are members of more than one role.

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

Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the referenced columns.

public:
 void Grant(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permissions, cli::array <System::String ^> ^ granteeNames, cli::array <System::String ^> ^ columnNames, bool grantGrant);
public void Grant (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permissions, string[] granteeNames, string[] columnNames, bool grantGrant);
Public Sub Grant (permissions As ObjectPermissionSet, granteeNames As String(), columnNames As String(), grantGrant As Boolean)
Parameters
permissions
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeNames
String[]

A String array value that specifies the grantees to be granted access to the set of permissions.

columnNames
String[]

A String array that specifies the names of the columns to which the permission is granted.

grantGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to grant access to the referenced columns for other users.

If True, the grantee is given the ability to grant other users access to the referenced columns.

If False, the grantee is not given the ability to deny other users access to the referenced columns.

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

Grants access to the specified permission and the ability to grant access to other users for the specified grantee on the referenced columns.

public:
 void Grant(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permissions, System::String ^ granteeName, cli::array <System::String ^> ^ columnNames, bool grantGrant);
public void Grant (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permissions, string granteeName, string[] columnNames, bool grantGrant);
Public Sub Grant (permissions As ObjectPermissionSet, granteeName As String, columnNames As String(), grantGrant As Boolean)
Parameters
permissions
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the set of permissions.

granteeName
String String String

A String value that specifies the grantee to be granted access to the set of permissions.

columnNames
String[]

A String array value that specifies the names of the columns to which the permission is granted.

grantGrant
Boolean Boolean Boolean

A Boolean property that specifies whether the grantee is given the ability to grant access to the referenced columns for other users.

If True, the grantee is given the ability to grant other users access to the referenced columns.

If False, the grantee is not given the ability to deny other users access to the referenced columns.

Grant(ObjectPermissionSet, String[], String[]) Grant(ObjectPermissionSet, String[], String[]) Grant(ObjectPermissionSet, String[], String[])

Grants access to the specified permission for the specified grantees on the stored procedure.

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

An ObjectPermissionSet object that specifies the permission.

granteeNames
String[]

A String array value that specifies the grantees to be granted access to the set of permissions.

columnNames
String[]

A String array that specifies the names of the columns to which the permission is granted.

Grant(ObjectPermissionSet, String, String[]) Grant(ObjectPermissionSet, String, String[]) Grant(ObjectPermissionSet, String, String[])

Grants access to the specified permission for the specified grantee on the referenced list of columns.

public:
 void Grant(Microsoft::SqlServer::Management::Smo::ObjectPermissionSet ^ permissions, System::String ^ granteeName, cli::array <System::String ^> ^ columnNames);
public void Grant (Microsoft.SqlServer.Management.Smo.ObjectPermissionSet permissions, string granteeName, string[] columnNames);
Public Sub Grant (permissions As ObjectPermissionSet, granteeName As String, columnNames As String())
Parameters
permissions
ObjectPermissionSet ObjectPermissionSet ObjectPermissionSet

An ObjectPermissionSet object that specifies the permission.

granteeName
String String String

A String value that specifies the grantee to be granted access to the set of permissions.

columnNames
String[]

A String array that specifies the names of the columns to which the permission is granted.

Applies to