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-06-2017

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

  • ora-13869 : Instance-wide SQL tracing on instance string is already enabled
  • ora-27039 : create file failed, file size limit reached
  • ora-06579 : Bind variable not big enough to hold the output value
  • ora-07241 : slemrd: read error.
  • ora-38496 : Expression Filter index is not in a valid state
  • ora-24500 : invalid UTF16 mode
  • ora-06515 : PL/SQL: unhandled exception string
  • ora-30654 : missing DEFAULT keyword
  • ora-14009 : partition bound may not be specified for a LOCAL index partition
  • ora-14123 : duplicate NOREVERSE clause
  • ora-13834 : name of SQL profile to be cloned must be provided
  • ora-15083 : failed to communicate with ASMB background process
  • ora-29886 : feature not supported for domain indexes
  • ora-00212 : block size string below minimum required size of string bytes
  • ora-29520 : name string resolved to a class in schema string that could not be accessed
  • ora-00038 : Cannot create session: server group belongs to another user
  • ora-32009 : cannot reset the memory value for instance string from instance string
  • ora-12485 : new effective label not within effective clearance
  • ora-31533 : only one change set (string) is allowed in change source
  • ora-22891 : cannot have multiple columns in REF constraint
  • ora-32593 : database supplemental logging attributes in flux
  • ora-23373 : object group "string"."string" does not exist
  • ora-22899 : cannot specify both scope and rowid constraint on ref column
  • ora-00294 : invalid archivelog format specifier 'string'
  • ora-39094 : Parallel execution not supported in this database edition.
  • ora-13826 : empty SQL profile not allowed for create or update SQL profile
  • ora-08313 : sllfop: could not allocate buffers
  • ora-02780 : Name given for the core dump directory is invalid
  • ora-31211 : DBMS_LDAP: PL/SQL - Invalid LDAP entry dn.
  • ora-29534 : referenced object string.string could not be resolved
  • 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.