Oracle Error ORA-06546: DDL statement is executed in an illegal context

Oracle Error Message

ORA-06546: DDL statement is executed in an illegal context

Reason for the Error

DDL statement is executed dynamically in illegal PL/SQL context.

– Dynamic OPEN cursor for a DDL in PL/SQL

– Bind variable’s used in USING clause to EXECUTE IMMEDIATE a DDL

– Define variable’s used in INTO clause to EXECUTE IMMEDIATE a DDL

Solution

Use EXECUTE IMMEDIATE without USING and INTO clauses to execute the DDL statement.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Oracle Error Message CLSGN-32767: Internal error. Reason for the Error An unexpected error occurred. Solution Examine the message(s) that accompany...
Oracle Error Message CLSGN-00211: OCR batch operation failed. string Reason for the Error Setting a set of Oracle Cluster Registry...
Oracle Error Message CLSGN-00210: failed to get value for OCR key “string”. string Reason for the Error It was not...