DB2 10.5 for Linux, UNIX, and Windows

CREATE SECURITY LABEL statement

The CREATE SECURITY LABEL statement defines a security label.

Invocation

This statement can be embedded in an application program or issued interactively. 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
>>-CREATE SECURITY LABEL--security-label-name------------------->

   .-,----------------------------------------------.   
   |                            .-,---------------. |   
   V                            V                 | |   
>----COMPONENT--component-name----string-constant-+-+----------><

Description

security-label-name
Names the security label. The name must be qualified with a security policy (SQLSTATE 42704), and must not identify an existing security label for this security policy (SQLSTATE 42710).
COMPONENT component-name
Specifies the name of a security label component. If the component is not part of the security policy security-policy-name, an error is returned (SQLSTATE 4274G). If a component is specified twice in the same statement, an error is returned (SQLSTATE 42713).
string-constant,...
Specifies a valid element for the security component. A valid element is one that was specified when the security component was created. If the element is invalid, an error is returned (SQLSTATE 4274F).

Examples