1、使用show errors捕获错误
- SQL> show errors;
- No errors.
- SQL> show errors package body "OTC_WRHS_POSITION"."OTC_WRHS_POSITION_PCK_tmp";
- No errors.
2、如果使用show errors无法查询到错误,直接查询视图dba_errors
- SQL> desc dba_errors;
- Name Type Nullable Default Comments
- -------------- -------------- -------- ------- ---------------------------------------------------------------
- OWNER VARCHAR2(30)
- NAME VARCHAR2(30) Name of the object
- TYPE VARCHAR2(12) Y Type: "TYPE", "TYPE BODY", "VIEW", "PROCEDURE", "FUNCTION",
- "PACKAGE", "PACKAGE BODY", "TRIGGER",
- "Java SOURCE" or "JAVA CLASS"
- SEQUENCE NUMBER Sequence number used for ordering purposes
- LINE NUMBER Line number at which this error occurs
- POSITION NUMBER Position in the line at which this error occurs
- TEXT VARCHAR2(4000) Text of the error
- ATTRIBUTE VARCHAR2(9) Y
- MESSAGE_NUMBER NUMBER Y
- SQL> select owner,name,TEXT from dba_errors where owner='OTC_WRHS_POSITION' and name='OTC_WRHS_POSITION_PCK_tmp' and
- 2 sequence=(select max(sequence) from dba_errors where owner='OTC_WRHS_POSITION');
- OWNER NAME TEXT
- -------------------- ------------------------- ------------------------------------------------------------
- OTC_WRHS_POSITION OTC_WRHS_POSITION_PCK_tmp PLS-00103: Encountered the symbol "ULL" when expecting one o
- f the following:
- . ( ) , * @ % & = - + < / > at in is mod remainder not re
- m
- <an exponent (**)> <> or != or ~= >= <= <> and or like LI
- KE2_
- LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
- The symbol "." was substituted for "ULL" to continue.
