Site icon IT Tutorial

ORA-14552: Cannot Perform a DDL Commit or Rollback Inside a Query or DML

I got ” ORA-14552: Cannot Perform a DDL Commit or Rollback Inside a Query or DML ”  error in Oracle database.

 

ORA-14552: Cannot Perform a DDL Commit or Rollback Inside a Query or DML

 

Details of error are as follows.

ORA-14552: cannot perform a DDL, commit or rollback inside a query or DML

Cause: DDL operations like creation tables, views etc. and transaction control statements 
such as commit/rollback cannot be performed inside a query or a DML statement.

Action: Ensure that the offending operation is not performed or use autonomous transactions
 to perform the operation within the query/DML operation.


 

 

cannot perform a DDL, commit or rollback inside a query or DML

This ORA-14552 error is related to the DDL operations like creation tables, views etc. and transaction control statements such as commit/rollback cannot be performed inside a query or a DML statement.

 

Ensure that the offending operation is not performed or use autonomous transactions to perform the operation within the query/DML operation.

 

pragma autonomous_transaction

You should use the pragma autonomous_transaction when using a stored procedure that contains commit.

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

Exit mobile version