ORA-20200

来源:互联网 发布:印度留学知乎 编辑:程序博客网 时间:2024/06/03 22:49

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
Information in this document applies to any platform.

SYMPTOMS

  • Some SQL scripts from ORACLE_HOME/rdbms/admin, such as addmrpt.sql, ashrpt.sql, awrinfo.sql, awrrpti.sql, etc... generate errors similar to the following:  

    SQL>  @?/rdbms/admin/awrrpt.sqlCurrent Instance~~~~~~~~~~~~~~~~...Instances in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  DB Id     Inst Num DB Name   Instance Host------------ -------- ------------ ------------ ------------* 126907423    1 IDHPR9   idhpr9 endecprtp1Using   126,907,423 for database IdUsing     1 for instance number :dbid      :=       126,907,423;                        *ERROR at line 2:ORA-06550: line 2, column 26:PLS-00103: Encountered the symbol "," when expecting one of the following:* & = - + ; < / > at in is mod remainder not rem<an exponent (**)> <> or != or ~= >= <= <> and or like like2like4 likec between || multiset member submultisetdeclare*ERROR at line 1:ORA-20200: Database/Instance / does not exist in DBA_HIST_DATABASE_INSTANCEORA-06512: at line 23

 

  

CHANGES

The numformat SQL*Plus Environment Variables has been updated to a non-standard format

CAUSE

The numformat SQL*Plus Environment Variables being set to an unexpected format caused the issue. For example:

SQL> show numformat
numformat "999,999,999,999"

AWR script inputs are influenced via SQL*Plus Environment Variables, since they are executed within the SQL*Plus environment.

Issue is reproducible for all *.SQL scripts from @$ORACLE_HOME/rdbms/admin like, addmrpt.sql, ashrpt.sql, awrinfo.sql, awrrpti.sql.

 

SOLUTION

Reset the numformat SQL*Plus environment to the default using the following:

To see the current value:

SQL> show numformat

To reset numformat back to the default and verify:

SQL> set numformat ""
SQL> show numformat

0 0