Granting a set of authorizations to a user
When managing authorizations, you might want to give all the authorizations that are held by one user (either those held directly or those granted explicitly) to another user or a list of users.
Procedure
To grant all the authorizations that are held by one user to another user:
- On the DB2 Administration Menu (ADB2) panel, specify option 1, and press Enter.
- On the System Catalog (ADB21) panel, specify option AO and press Enter.
- On the System Catalog (ADB21) panel - Authorization options, in the Grantee field, specify the name of the user from whom to copy authorizations.
- Specify option UA, and press Enter.
-
On the User Authorizations Summary
(ADB2AUS) panel, issue the AU
or AE command to display the authorizations that are held by the grantee that you
specified.
AU shows the authorizations that the specified grantee holds directly, and AE shows the authorizations that the specified grantee was granted explicitly.
-
On the User Authorizations
(ADB2AUD) panel, ensure that all of
the values in the Grantee column are the same.
If needed, filter on the Grantee column; see Filtering data on panels.
- Issue the GRANT primary command, and press Enter.
-
On the Grant Privileges
(ADB2AUG) panel, specify the users
to whom you would like to grant authorizations in the Grantees
field, adjust the selected privileges as needed, and press Enter:
The SQL is generated and executed if the size of the generated SQL is less than 32K. Otherwise, the Statement Execution Prompt (ADB2PSTM) panel is displayed, and you can choose to create a batch job with the statements or add the statements to a work statement list (WSL).