DB2 10.5 for Linux, UNIX, and Windows

GRANT (exemption) statement

This form of the GRANT statement grants to a user, group, or role an exemption on an access rule for a specified label-based access control (LBAC) security policy.

When the user holding the exemption accesses data in a table protected by that security policy the indicated rule will not be enforced when deciding if they can access the data.

Invocation

This statement can be embedded in an application program or issued through the use of dynamic SQL statements. It is an executable statement that can be dynamically prepared only if DYNAMICRULES run behavior is in effect for the package (SQLSTATE 42509).

Authorization

The privileges held by the authorization ID of the statement must include SECADM authority.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-GRANT EXEMPTION ON RULE-------------------------------------->

>--+-DB2LBACREADARRAY-----------------+--FOR--policy-name------->
   +-DB2LBACREADSET-------------------+                     
   +-DB2LBACREADTREE------------------+                     
   +-DB2LBACWRITEARRAY--+-WRITEDOWN-+-+                     
   |                    '-WRITEUP---' |                     
   +-DB2LBACWRITESET------------------+                     
   +-DB2LBACWRITETREE-----------------+                     
   '-ALL------------------------------'                     

       .-,-----------------------------.   
       V                               |   
>--TO----+-------+--authorization-name-+-----------------------><
         +-USER--+                         
         +-GROUP-+                         
         '-ROLE--'                         

Description

EXEMPTION ON RULE
Grants an exemption on an access rule.
DB2LBACREADARRAY
Grants an exemption on the predefined DB2LBACREADARRAY rule.
DB2LBACREADSET
Grants an exemption on the predefined DB2LBACREADSET rule.
DB2LBACREADTREE
Grants an exemption on the predefined DB2LBACREADTREE rule.
DB2LBACWRITEARRAY
Grants an exemption on the predefined DB2LBACWRITEARRAY rule.
WRITEDOWN
Specifies that the exemption only applies to write down.
WRITEUP
Specifies that the exemption only applies to write up.
DB2LBACWRITESET
Grants an exemption on the predefined DB2LBACWRITESET rule.
DB2LBACWRITETREE
Grants an exemption on the predefined DB2LBACWRITETREE rule.
ALL
Grants an exemption on all of the predefined rules.
FOR policy-name
Identifies the security policy for which the exemption is being granted. The exemption will only be effective for tables that are protected by this security policy. The name must identify a security policy already described in the catalog (SQLSTATE 42704).
TO
Specifies to whom the exemption is granted.
USER
Specifies that the authorization-name identifies a user.
GROUP
Specifies that the authorization-name identifies a group name.
ROLE
Specifies that the authorization-name identifies a role name. The role name must exist at the current server (SQLSTATE 42704).
authorization-name,...
Lists the authorization IDs of one or more users, groups, or roles.

Rules

Notes

Examples