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

Cause : 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

Action - How to fix it : DBA Scripts :: www.high-oracle.com/scripts

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

update : 17-08-2017
ORA-06546

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

  • ora-01571 : redo version string incompatible with ORACLE version string
  • ora-22371 : Table contains data of type string.string, version string, which does not exist
  • ora-00067 : invalid value string for parameter string; must be at least string
  • ora-24335 : cannot support more than 1000 columns
  • ora-01646 : tablespace 'string' is not read only - cannot make read write
  • ora-34001 : (MODCOMP14) Concat leaf dimension workspace object already is used in a DIMENSION statement, either explicitly or as a leaf of another concat dimension.
  • ora-29704 : cannot specify ACTIVE_INSTANCE_COUNT in 8.1.5 or earlier release
  • ora-09209 : sftget: error reading from file
  • ora-16700 : the standby database has diverged from the primary database
  • ora-02355 : error opening file: string
  • ora-12211 : TNS:needs PREFERRED_CMANAGERS entry in TNSNAV.ORA
  • ora-19674 : file string is already being backed up with proxy copy
  • ora-26505 : unexpected internal null
  • ora-07606 : szprv: $CHKPRO failure
  • ora-35095 : (QFSVNS01) One or more imported values of fixed-width dimension workspace object have been truncated.
  • ora-02855 : Number of requests is less than the number of slaves
  • ora-31456 : error executing a procedure in the DBMS_CDC_UTILITY package
  • ora-16805 : change of LogXptMode property violates overall protection mode
  • ora-07587 : spdcr: $CREPRC failure
  • ora-01913 : EXCLUSIVE keyword expected
  • ora-27414 : Invalid BY value type
  • ora-27412 : repeat interval or calendar contains invalid identifier: string
  • ora-39216 : object type "string"."string" hashcode mismatch
  • ora-22808 : REF dereferencing not allowed
  • ora-01926 : cannot GRANT to a role WITH GRANT OPTION
  • ora-39058 : current object skipped: string of type string
  • ora-16127 : stalled waiting for additional transactions to be applied
  • ora-25301 : Cannot enqueue or dequeue user buffered messages to a database with version lower than 10.2
  • ora-13865 : Module name must be specified
  • ora-30018 : Create Rollback Segment failed, USN string is out of range
  • Oracle Database Error Messages



    Oracle Database High Availability Any organization evaluating a database solution for enterprise data must also evaluate the High Availability (HA) capabilities of the database. Data is one of the most critical business assets of an organization. If this data is not available and/or not protected, companies may stand to lose millions of dollars in business downtime as well as negative publicity. Building a highly available data infrastructure is critical to the success of all organizations in today's fast moving economy.

    Well, the reason for above error is that i have taken the above script from a 11g database and running it on 10g database. 11g has bring some changes in password management. Below code is executed on 11g and user created successfully, which is expected result.