High severitycredentials
Oracle Database Error:
ORA-01031
What does this error mean?
The connected Oracle user does not have the privilege required to execute the SQL statement — for example, SELECT on a table, CREATE TABLE, or EXECUTE on a stored procedure.
Common causes
- 1Pipeline service account was not granted the required object privilege
- 2A role was revoked or the user was migrated to a new account without re-granting privileges
- 3The privilege was granted via a role that is not active in the pipeline's session
- 4DDL privilege (CREATE TABLE, CREATE VIEW) was not granted
- 5EXECUTE privilege on a stored procedure is missing
How to fix it
- 1Step 1: Identify the missing privilege from the error context (e.g. `SELECT privilege FROM session_privs;` or `SELECT * FROM user_sys_privs;`).
- 2Step 2: Grant the required object privilege: `GRANT SELECT, INSERT ON schema.table TO pipeline_user;`.
- 3Step 3: For system privileges: `GRANT CREATE TABLE TO pipeline_user;`.
- 4Step 4: Grant role-based privileges directly if the pipeline session does not activate roles: `GRANT role_name TO pipeline_user;` then verify with `SET ROLE ALL`.
- 5Step 5: If using a stored procedure, grant EXECUTE: `GRANT EXECUTE ON schema.procedure_name TO pipeline_user;`.
Example log output
ORA-01031: insufficient privileges
SQL: CREATE TABLE staging_temp AS SELECT * FROM source_table