How to show errors in sqlplus

后端 未结 1 837
慢半拍i
慢半拍i 2020-12-22 01:40

I would like to know how to show errors in sqlplus.

  1. try to compile a view

    alter view SYS.DBA_XML_SCHEMAS compile;

  2. I hav

相关标签:
1条回答
  • 2020-12-22 02:28

    You can query the dba_errors view, or the all_errors view, directly; the SQL*Plus show errors command seems to be a wrapper around that anyway.

    select line, position, attribute, text
    from dba_errors
    where owner = 'SYS'
    and type = 'VIEW'
    and name = 'DBA_XML_SCHEMAS'
    order by sequence;
    

    But based on what show errors is telling you, that will just show the same thing, error "ORA-00942 : table or view does not exist" from line 0 position 0.

    That doesn't make much sense, but internal views are sometimes strange things, and attempting to recompile one is probably not a good idea.

    You might need to get your DBA to run utlrp.sql to recompile all invalid objects in the database. As with anything you think of doing under the SYS schema, that should be done with care; and only if selecting from the view still says it's invalid and failed recompilation.

    0 讨论(0)
提交回复
热议问题