The NOT SECURED clause is missing from generated DDL for CREATE TRIGGER
search cancel

The NOT SECURED clause is missing from generated DDL for CREATE TRIGGER

book

Article ID: 205520

calendar_today

Updated On:

Products

RC/Query for DB2 for z/OS Database Management for DB2 for z/OS - Administration Suite

Issue/Introduction

When using the RC/Query for Db2 for z/OS (RCQ) DDL command for a trigger defined as 'NOT SECURED', the 'NOT SECURED' clause is missing from the generated DDL.

    CREATE TRIGGER trigger-name
          NO CASCADE BEFORE INSERT
          ON table-name
          REFERENCING
                      NEW AS N
          FOR EACH ROW MODE DB2SQL
BEGIN ATOMIC
trigger-action
END;

Why is the 'NOT SECURED' clause not generated?

Resolution

If the GENERATE_DEFAULT_CLAUSES_IN_CREATE parameter is set to (N) in the OFS member of hlq.CDBAPARM,
then default clauses in the CREATE DDL will be suppressed. 

'NOT SECURED' is a default clause and so will not be generated in the DDL if this parameter is set to (N).

If you wish to generate default clauses then you need to change this parameter to (Y).
This affects DDL generated by both the DDL and HDDL commands.