db_ddl_grant_group script

The db_ddl_grant_group script dumps out the SQL DDL statement that was used to grant access to a group, that is, the GRANT statement.

The db_ddl_grant_group command is part of the Db2 support tools. To run it, a database name is required following -d | -db. By default, the GRANT...TO GROUP, GRANT...TO PUBLIC, GRANT...TO ROLE statements will be produced for all objects for which the privileges were granted. You can then use -schema or -tb to further narrow down the outputs.

Syntax

db_ddl_grant_group  -d|-db <dbname> [-schema <schema_name>] [-tb <table_name>]

Parameters

All parameters are optional unless specified otherwise.
- db <database_name>

Specifies a database name. This parameter is required.

-schema <schema_name>

Specifies a schema name. If specified, the SQL/DDL statements pertaining to the objects belonging only to that schema are generated.

-tb <table_name>

Specifies a table name. If specified, the SQL/DDL statements pertaining to this single table are generated.

Outputs

GRANT statements are sent to standard output.