前天我给oracle另外建了一个instance,然后之前那个instance中创建的public synonym就无法删除,提示如下:
ORA-00604: error occurred at recursive SQL level 1 
ORA-00942: table or view does not exist 
请问谁知道这是为什么?怎么解决?谢谢!

解决方案 »

  1.   

    作个sql_trace 看看是哪里出错了。
      

  2.   

    trace内容如下,有些看不懂:TKPROF: Release 10.2.0.1.0 - Production on 星期一 8月 10 10:45:06 2009Copyright (c) 1982, 2005, Oracle.  All rights reserved.Trace file: /home/oracle/oracle/product/10.2.0/db_1/admin/hmis/udump/hmis_ora_8125.trc
    Sort options: default********************************************************************************
    count    = number of times OCI procedure was executed
    cpu      = cpu time in seconds executing 
    elapsed  = elapsed time in seconds executing
    disk     = number of physical reads of buffers from disk
    query    = number of buffers gotten for consistent read
    current  = number of buffers gotten in current mode (usually for update)
    rows     = number of rows processed by the fetch or execute call
    ********************************************************************************The following statement encountered a error during parse:select dummy from dual where  ora_dict_obj_type = 'TABLE'Error encountered: ORA-00942
    ********************************************************************************alter session set sql_trace=true
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        0      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        1      0.00       0.00          0          0          0           0Misses in library cache during parse: 0
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: SYS
    ********************************************************************************begin :id := sys.dbms_transaction.local_transaction_id; end;
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        4      0.00       0.00          0          0          0           0
    Execute      4      0.00       0.00          0          0          0           4
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        8      0.00       0.00          0          0          0           4Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: SYS
    ********************************************************************************select 'x' 
    from
     dual
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        2      0.00       0.00          0          0          0           0
    Execute      2      0.00       0.00          0          0          0           0
    Fetch        2      0.00       0.00          0          0          0           2
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        6      0.00       0.00          0          0          0           2Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: SYSRows     Row Source Operation
    -------  ---------------------------------------------------
          1  FAST DUAL  (cr=0 pr=0 pw=0 time=4 us)********************************************************************************drop public synonym a
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        2      0.00       0.00          0          0          0           0Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: SYS
    ********************************************************************************BEGIN
      BEGIN
        IF (xdb.DBMS_XDBZ0.is_hierarchy_enabled_internal(sys.dictionary_obj_owner, sys.dictionary_obj_name, sys.dictionary_obj_owner)) THEN
          xdb.XDB_PITRIG_PKG.pitrig_truncate(sys.dictionary_obj_owner, sys.dictionary_obj_name);
        END IF;
      EXCEPTION
        WHEN OTHERS THEN
         null;
      END;
      BEGIN
        IF (xdb.DBMS_XDBZ0.is_hierarchy_enabled_internal(sys.dictionary_obj_owner, sys.dictionary_obj_name, sys.dictionary_obj_owner, xdb.DBMS_XDBZ.IS_ENABLED_RESMETADATA)) THEN
          xdb.XDB_PITRIG_PKG.pitrig_dropmetadata(sys.dictionary_obj_owner, sys.dictionary_obj_name);
        END IF;
      EXCEPTION
        WHEN OTHERS THEN
         null;
      END;
    END;call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        2      0.00       0.00          0          0          0           1Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 38     (recursive depth: 1)
    ********************************************************************************declare
       stmt varchar2(200);
       rdf_exception EXCEPTION;   pragma exception_init(rdf_exception, -20000);
    BEGIN
         if dictionary_obj_type = 'USER' THEN
           BEGIN
             EXECUTE IMMEDIATE
              'begin ' ||
                'mdsys.rdf_apis_internal.' ||
                'notify_drop_user(''' || dictionary_obj_name || '''); ' ||
              'end;';
             EXCEPTION
               WHEN rdf_exception THEN RAISE;
               WHEN OTHERS        THEN NULL;
           END;
        end if;
    end;call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           1
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        2      0.00       0.00          0          0          0           1Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 46     (recursive depth: 1)
    ********************************************************************************alter session set sql_trace=false
    call     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        2      0.00       0.00          0          0          0           0Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: SYS********************************************************************************OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTScall     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        8      0.00       0.00          0          0          0           0
    Execute      9      0.00       0.00          0          0          0           4
    Fetch        2      0.00       0.00          0          0          0           2
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total       19      0.00       0.01          0          0          0           6Misses in library cache during parse: 3
    Misses in library cache during execute: 1
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTScall     count       cpu    elapsed       disk      query    current        rows
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    Parse        2      0.00       0.00          0          0          0           0
    Execute      2      0.00       0.00          0          0          0           2
    Fetch        0      0.00       0.00          0          0          0           0
    ------- ------  -------- ---------- ---------- ---------- ----------  ----------
    total        4      0.00       0.00          0          0          0           2Misses in library cache during parse: 0   11  user  SQL statements in session.
        0  internal SQL statements in session.
       11  SQL statements in session.
    ********************************************************************************
    Trace file: /home/oracle/oracle/product/10.2.0/db_1/admin/hmis/udump/hmis_ora_8125.trc
    Trace file compatibility: 10.01.00
    Sort options: default       1  session in tracefile.
          11  user  SQL statements in trace file.
           0  internal SQL statements in trace file.
          11  SQL statements in trace file.
           7  unique SQL statements in trace file.
         127  lines in trace file.
          31  elapsed seconds in trace file.