Granting privileges by generating SQL
You can generate SQL to re-create a set of privileges on an object or a set of privileges held by an authorization ID
You can use the BATCH parameter with the DCL command. Generating-JCL-for-a-job-in-batch explains the procedure for generating a job by using the DESCRIBE command. You can use a similar procedure by substituting the DCL command.
To grant privileges
Issue the DCL line command against one of the source objects in the following table:
Object code | Object |
---|---|
CI | Collection ID |
DB | Database |
DT | Data or distinct type |
FN | Function |
MQT | Materialized query tables |
NP | Native SQL stored procedures |
PG | Package |
PL | Plan |
PR | Procedure |
SC | Schema |
SE | Identity columns in sequences |
SG | Storage group |
SU | System privileges for AUTHIDs |
TB | Table |
TS | Table space |
UA | User authorization |
US | User |
VW | View |
Related topic