Start of change

ALTER MASK

The ALTER MASK statement alters a column mask 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

Read syntax diagramSkip visual syntax diagramALTER MASKmask-name ENABLEDISABLEREGENERATE

Description

mask-name
Identifies the column mask to be altered. It must identify a column mask that exists at the current server.
ENABLE, DISABLE, or REGENERATE
ENABLE
Specifies that the column mask is to be enabled for column access control. If column access control is not currently activated for the table, the column mask will become effective when column access control is activated for the table. If column access control is currently activated for the table, the column mask becomes effective immediately.
A column mask that gets an error when trying to be enabled cannot be enabled until any errors in the mask definition are resolved. This may require the column mask to be dropped and recreated with a modified definition.
ENABLE is ignored if the column mask is already defined as enabled for column access control.
DISABLE
Specifies that the column mask is to be disabled for column access control. If column access control is not currently activated for the table, the column mask will remain ineffective when column access control is activated for the table. If column access control is currently activated for the table, the column mask becomes ineffective.
DISABLE is ignored if the column mask is already defined as disabled for column access control.
REGENERATE
Specifies that the column mask is to be regenerated. The column mask definition in the catalog is used and existing dependencies and authorizations, if any, are retained. The column mask definition is reevaluated as if the column mask were being created. The user-defined functions that are referenced in the column mask definition must be resolved to the same secure UDFs as were resolved during the column mask creation.

Examples

Example 1: Enable column mask M1.

ALTER MASK M1 ENABLE 

Example 2: Disable column mask M1.

ALTER MASK M1 DISABLE 

Example 3: Regenerate column mask M1.

ALTER MASK M1 REGENERATE 
End of change