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 : 26-05-2017
ORA-06546

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

  • ora-23310 : object group "string"."string" is not quiesced
  • ora-07234 : slemcw: fseek error.
  • ora-30974 : invalid Path Id Index option for XML Index
  • ora-38861 : flashback recovery stopped before reaching recovery target
  • ora-16515 : no rcv channel
  • ora-25148 : ONLINE option not permitted
  • ora-39054 : missing or invalid definition of the SQL output file.
  • ora-38606 : FI support threshold not between [0, 1]
  • ora-13260 : layer table string does not exist
  • ora-15057 : specified size of string MB is larger than actual size of string MB
  • ora-22340 : cannot string type "string"."string". Dependent tables must be upgraded to latest version
  • ora-12435 : invalid audit success: string
  • ora-09716 : kslcll: Unable to fix in-flux lamport latch.
  • ora-28611 : bitmap index is corrupted - see trace file for diagnostics
  • ora-06132 : NETTCP: access denied, wrong password
  • ora-30493 : The percentile value should be a number between 0 and 1.
  • ora-26744 : STREAMS capture process "string" does not support "string"."string" because of the following reason: string
  • ora-19673 : error during proxy file string
  • ora-14637 : cannot merge a subpartition with itself
  • ora-32844 : exceeded maximum number of string values
  • ora-19630 : end of volume encountered while copying backup piece
  • ora-39040 : Schema expression "string" must identify exactly one schema.
  • ora-16185 : REMOTE_ARCHIVE_ENABLE and LOG_ARCHIVE_CONFIG mutually exclusive
  • ora-31608 : specified object of type string not found
  • ora-02829 : No segment of the proper size is available
  • ora-32807 : message system link string already exists
  • ora-14170 : cannot specify clause in CREATE TABLE|INDEX
  • ora-03246 : Invalid block number specified
  • ora-31651 : communication error with master process - detaching job
  • ora-32130 : invalid offset/index refrenced in Bytes
  • 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.