TRANSFER OWNERSHIP

Passes ownership of an SQL schema from one user or group to another user or group.
idms
Passes ownership of an SQL schema from one user or group to another user or group.
Authorization
To transfer ownership, one of the following must be true:
  • You own the schema
  • You hold DBADMIN privilege on the dictionary in which the schema is defined
  • You hold SYSADMIN privilege
Syntax
►►─── TRANSFER OWNERSHIP OF SCHEMA 
schema-name
 ───────────────────────────────►    ►─── TO 
authorization-identifier
 ────────────────────────────────────────────►◄
Parameters
  • OF SCHEMA
    schema-name
    Specifies the schema whose ownership is being transferred to the user or group identified in the TO parameter.
    Schema-name
    must identify a schema defined in the dictionary.
  • TO authorization-identifier
    Identifies a user or group.
    Expanded syntax for
    authorization-identifier
    is presented in Notes on Security Statement Syntax.
Usage
Schema Ownership
At any given time, a schema can be owned by one user or group. The initial owner is the user who created the schema. When ownership of a schema is transferred to a group, each user in the group has all the privileges associated with ownership.
Ownership of Other Resources
Technically, schemas are the only database resources that users own. However, by association, the user or group that owns a schema is also said to own the tables, functions, procedures, table procedures, views, and access modules in the schema.
Ownership Privileges
The owner of a schema has all applicable privileges on resources in the schema, as well as the privilege of granting those privileges to other users or groups. If you transfer ownership of a schema to another user or group, you no longer own the resources in the schema.
Transferring Ownership to a Single User
The following TRANSFER OWNERSHIP statement transfers ownership of the PKE_SCH schema to user PKE:
transfer ownership of schema pke_sch    to pke;
Transferring Ownership to a Group
The following TRANSFER OWNERSHIP statement transfers ownership of the SALES schema to the SALES_GRP group:
transfer ownership of schema sales    to sales_grp;