Changing object ownership

You can make a Db2 role, a primary authorization ID, or a secondary authorization ID the owner of an object.

About this task

Begin general-use programming interface information.

Object ownership carries with it a set of related privileges on the object. The privileges that are implicit in ownership cannot be revoked; you cannot replace or change the owner of an object while the object exists.

If a Db2 role is the owner of an object, you don't need to change or replace the ownership. All users that are associated with that role have the same owner privileges. To make a role the owner of an object, you need to create the object in a trusted context that is defined with the ROLE AS OBJECT OWNER AND QUALIFIER clause.

You can change the owner of an object from an authorization ID to a role by using the CATMAINT UPDATE utility with the OWNER option. To do so, you must also have the installation SYSADM authority, define a trusted context with the ROLE AS OBJECT OWNER AND QUALIFIER clause, and run the process in the new function mode.

Alternately, you can make the object owning ID a secondary ID with which several primary IDs are associated. You can change the list of primary IDs that are associated with the secondary ID without dropping and re-creating the object.

If the owner of the object is a primary authorization ID and if you need to transfer the ownership to another ID, you must drop the object and then re-create it with a new authorization ID as the owner.

End general-use programming interface information.