GRANT statement (collection privileges)

This form of the GRANT statement grants privileges on collections.

Syntax for GRANT (collection privileges)

Read syntax diagramSkip visual syntax diagram GRANT CREATEPACKADM ONIN COLLECTION ,collection-id* TO ,authorization-nameROLErole-namePUBLIC WITH GRANT OPTION

Description for GRANT (collection privileges)

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 statement for a description of the TO clause.
WITH GRANT OPTION
Refer to GRANT statement for a description of the WITH GRANT OPTION clause.

Examples for GRANT (collection privileges)

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;