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

Start of changeNot valid for REBIND of a native SQL procedure package.End of change

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.

Start of changeInteractions 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.End of change

OWNER for BIND and REBIND in trusted context: When BIND and REBIND commands are issued in a trusted context that has the ROLE AS OBJECT OWNER clause, the owner is determined as follows:
  • 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.
If the ROLE AS OBJECT OWNER clause is not in effect for the trusted context, then the current rules for BIND and REBIND ownership apply. If a role is associated in a trusted context, then the role privileges are included in the binder's privilege set to determine if the binder is allowed to perform the bind.

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.