GRANT statement (plan privileges)
This form of the GRANT statement grants privileges on plans.
Syntax for GRANT (plan privileges)
Description for GRANT (plan privileges)
- BIND
- Grants the privilege to use the BIND, REBIND, and FREE subcommands for the identified plans. (The authority to create new plans using BIND ADD is a system privilege.)
- EXECUTE
- Grants the privilege to run programs that use the identified plans.
- ON PLAN plan-name,...
- Identifies the application plans on which the privileges are granted. For each identified plan, you must have all specified privileges with the GRANT option.
- 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 (plan privileges)
Example 1: Grant the privilege
to bind plan DSN8IP13 to
user JONES.
GRANT BIND ON PLAN DSN8IP13 TO JONES;
Example 2: Grant privileges to bind and execute plan DSN8CP13 to all users at the
current server.
GRANT BIND,EXECUTE ON PLAN DSN8CP13 TO PUBLIC;
Example
3: Grant the privilege to execute plan DSN8CP13 to
users ADAMSON and BROWN with grant option.
GRANT EXECUTE ON PLAN DSN8CP13 TO ADAMSON,BROWN WITH GRANT OPTION;
Example 4: Grant the privileges to bind the DSN91PLN plan
to role ROLE1:
GRANT BIND ON PLAN DSN91PLN TO ROLE ROLE1;