GRANT (collection privileges)

This form of the GRANT statement grants privileges on collections.

Syntax

Read syntax diagram
                                             .-,-------------.     
                                             V               |     
>>-GRANT--+-CREATE--+--+-ON-+--COLLECTION--+---collection-id-+-+-->
          '-PACKADM-'  '-IN-'              '-*-----------------'   

       .-,----------------------.                          
       V                        |                          
>--TO----+-authorization-name-+-+--+-------------------+-------><
         +-ROLE--role-name----+    '-WITH GRANT OPTION-'   
         '-PUBLIC-------------'                            

Description

CREATE IN
Grants the privilege to use the BIND subcommand to create packages in the designated collections.

The word ON can be used instead of IN.

PACKADM ON
Grants package administrator authority for the designated collections.

The word IN can be used instead of ON.

COLLECTION collection-id,...
Identifies the collections on which the specified privilege is granted. The collections do not have to exist.
COLLECTION *
Indicates that the specified privilege is granted on all collections including those that do not currently exist.
TO
Refer to GRANT for a description of the TO clause.
WITH GRANT OPTION
Refer to GRANT for a description of the WITH GRANT OPTION clause.

Examples

Example 1: Grant the privilege to create new packages in collections QAACLONE and DSN8CC61 to CLARK.
   GRANT CREATE IN COLLECTION QAACLONE, DSN8CC61 TO CLARK;
Example 2: Grant the privileges to create new packages in collection DSN8CC91 to role ROLE1:
   GRANT CREATE IN COLLECTION DSN8CC91 TO ROLE ROLE1;