Oracle Error ORA-56728: SQL blocks cannot be nested

Oracle Error Message

ORA-56728: SQL blocks cannot be nested

Reason for the Error

An attempt was made to start an SQL block using DBMS_RESOURCE_MANAGER.BEGIN_SQL_BLOCK() while already inside an SQL block.

Solution

Close the existing SQL block using DBMS_RESOURCE_MANAGER.BEGIN_SQL_BLOCK() or remove this call.