Creating security policies

You create security policies after you have created security label components.

Before you begin

You must hold the DBSECADM role to create a security policy. The maximum number of security label components with which you can build a security policy is 16.

About this task

The order in which you list security label components when you create a security policy does not indicate any sort of precedence or other relationship among the components, but it is important to know the order when creating security labels with built-in SECLABEL functions.

Procedure

Create a security policy by issuing the CREATE SECURITY POLICY statement, as described in HCL OneDB™ Guide to SQL: Syntax.

Example

The following example shows this SQL statement, where company is the security policy name and region and department are security label components used in the policy:
CREATE SECURITY POLICY company
   COMPONENTS region, department;