A package is a database object that contains the information
needed by the database manager to access data in the most efficient
way for a particular application program. Package privileges enable
a user to create and manipulate packages.
The user must have CONNECT authority on the database to use any
of the following privileges:
- CONTROL provides the user with the ability to
rebind, drop, or execute a package as well as the ability to extend
those privileges to others. The creator of a package automatically
receives this privilege. A user with CONTROL privilege is granted
the BIND and EXECUTE privileges, and can also grant these privileges
to other users by using the GRANT statement. (If a privilege is granted
using WITH GRANT OPTION, a user who receives the BIND or EXECUTE privilege
can, in turn, grant this privilege to other users.) To grant CONTROL
privilege, the user must have ACCESSCTRL or SECADM authority.
- BIND privilege on a package allows the user to rebind or bind
that package and to add new package versions of the same package name
and creator.
- EXECUTE allows the user to execute or run a package.
Note: All package privileges apply to all VERSIONs that share the
same package name and creator.
In addition to these package privileges, the
BINDADD database authority allows users to create new packages or
rebind an existing package in the database.
Objects referenced by nicknames need to pass authentication checks
at the data sources containing the objects. In addition, package users
must have the appropriate privileges or authority levels for data
source objects at the data source.
It is possible that packages containing nicknames might require
additional authorization steps because DB2® database
uses dynamic queries when communicating with DB2 Family data sources. The authorization ID
running the package at the data source must have the appropriate authority
to execute the package dynamically at that data source.