ALTER PERMISSION
The ALTER PERMISSION statement alters a row permission that exists at the current server.
Invocation
This statement can be embedded in an application program or issued interactively. It is an executable statement that can be dynamically prepared.
Authorization
The authorization ID of the statement must have security administrator authority. See Administrative authority.
Syntax
Description
- permission-name
- Identifies the row permission to be altered. It must identify a row permission that exists at the current server. It cannot be a default permission.
- ENABLE, DISABLE, or REGENERATE
- ENABLE
- Specifies that the row permission is to be enabled for row access control. If row access control is not currently activated for the table, the row permission will become effective when row access control is activated for the table. If row access control is currently activated for the table, the row permission becomes effective immediately.
- DISABLE
- Specifies that the row permission is to be disabled for row access control. If row access control is not currently activated for the table, the row permission will remain ineffective when row access control is activated for the table. If row access control is currently activated for the table, the row permission becomes ineffective.
- REGENERATE
- Specifies that the row permission is to be regenerated. The row permission definition in the catalog is used and existing dependencies and authorizations, if any, are retained. The row permission definition is reevaluated as if the row permission were being created. The user-defined functions that are referenced in the row permission must be resolved to the same secure UDFs as were resolved during the row permission creation.
Examples
Example 1: Enable permission P1.
ALTER PERMISSION P1 ENABLE
Example 2: Disable permission P1.
ALTER PERMISSION P1 DISABLE
Example 3: Regenerate permission P1.
ALTER PERMISSION P1 REGENERATE