-20342 AUTHORIZATION ID auth-ID DOES NOT HAVE THE REQUIRED PRIVILEGE privilege-name ON OBJECT object-name OF TYPE type-name FOR OWNERSHIP TRANSFER.
Explanation
A TRANSFER OWNERSHIP statement is issued to transfer ownership to authorization ID auth-ID. The transfer failed due to one or more of the following conditions:
- The authorization ID does not have the required privilege to own the object.
- The authorization ID does not have the required privilege to specify a different schema for the ownership transfer of a table or a view.
- The current owner does not have the required privilege to maintain the dependency on the package.
If the ownership is transferred to a role, the role name is returned as a single token in the format of ROLE: role-name.
System action
The statement cannot be processed.
Programmer response
Grant authorization ID auth-ID all the privilege on object object-name that is required for the ownership transfer.
SQLSTATE
42514