OWNER bind option
The OWNER option determines the authorization ID of the owner of a plan or package.
OWNER | ( authorization-id ) | On: BIND and REBIND
PLAN and PACKAGE Not valid for REBIND of a native SQL procedure package. |
The owner must have the privileges required to execute the SQL statements contained in the object.
If ownership changes, all grants for privileges on the object that the previous owner issued change to name the new owner as the grantor. The new owner has the privileges BIND and EXECUTE on the object and grants them to the previous owner.
You can bind or rebind only the objects for which the authorization ID has bind privileges. If you do not specify an authorization ID, the process rebinds only the objects for which the primary ID has bind privileges.
Interactions with the PLANMGMT option: If you plan to change this option and the PLANMGMT option in a REBIND command, see PLANMGMT bind option for the implications.
- If the OWNER option is not specified, the role associated with the binder becomes the owner.
- If the OWNER option is specified, the role specified in the OWNER option becomes the owner. In a trusted context, the OWNER specified must be a role. For the bind to succeed, the binder needs BINDAGENT privilege from the role specified in the OWNER option. The binder also receives BINDAGENT privilege, if the role associated with the binder has BINDAGENT privilege.
For remote BIND or REBIND PACKAGE only, the value of OWNER is subject to translation when sent to the remote system.
Defaults:
Process | Default value |
---|---|
BIND PLAN | Primary authorization ID of the agent that runs the bind process |
BIND PACKAGE | Primary authorization ID of the agent that runs the bind process |
REBIND PLAN | Existing value |
REBIND PACKAGE | Existing value |
Catalog record: Column OWNER of table SYSPACKAGE, column GRANTOR of table SYSPACKAUTH, and column CREATOR of table SYSPLAN.