exceptionplsqlplsqldeveloper

Error while creating table from CREATE_ERROR_LOG


I am getting error when I am trying to create the error log table using DBMS_ERRLOG.CREATE_ERROR_LOG.

Error Message: table or view does not exist.

Begin
dbms_errlog.create_error_log(dml_table_name => 'table_name');
End;

I also tried -

exec dbms_errlog.create_error_log(dml_table_name => 'table_name');

Solution

  • Did you - instead of table_name - use real table name?

    You:

    SQL> Begin
      2  dbms_errlog.create_error_log(dml_table_name => 'table_name');
      3  End;
      4  /
    Begin
    *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "SYS.DBMS_SQL", line 1179
    ORA-06512: at "SYS.DBMS_ERRLOG", line 225
    ORA-06512: at line 2
    

    Me:

    SQL> Begin
      2  dbms_errlog.create_error_log(dml_table_name => 'EMP');
      3  End;
      4  /
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    (table EMP actually exists in this schema).