On this page
New in v25.1:
The ALTER JOB
statement transfers ownership of a job between users or roles.
Required privileges
To alter job ownership, the user must be one of the following:
- The current job owner.
- A member of the role that is the current owner.
- An
admin
.
Unless the user is an admin
, they can only transfer ownership of a job to themselves or to a role of which they are a member.
To add a user to a role, refer to the GRANT
statement.
Synopsis
Parameters
Parameter | Description |
---|---|
a_expr |
The job ID to modify. |
role_spec |
The role or user. |
Example
To transfer job ownership from the user who created the job to a role they're a member of:
ALTER JOB job_id OWNER TO role_name;