Recover Error Msg at Runtime

DBA Geral (instalação, configuração do banco, scripts do Sql*Plus, shell scripts, batch scripts, etc...)
Post Reply
scardofax
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 6
Joined: Wed, 28 Jan 2009 8:50 am
Location: Americana - SP
Juliano
Analista

Environment information:
* Oracle version: 10g
* Operating system: Win2000

I am a beginner in Oracle, I have a problem recovering the error message .

I looked for more I did not find anything to help me.

is the following I have a trigger that triggers to every creation and change of the object, with the user_erros table I can pick up the code error, but as I am doing a log of errors I do not get in run time .. because I compile and the object has a bug, I set the object and recoupment but the error is only removed from the user_erros table at the end of the run, that is in my log table the object only gets valid if it complicks it Twice after repairing the error.

to get the code at run time I use ora_sql_txt, what I need is a similar function but I need to get the error message .. if they help me thank you

Thanks
jp_lopes
Rank: Estagiário Júnior
Rank: Estagiário Júnior
Posts: 2
Joined: Mon, 02 Feb 2009 12:08 pm
Location: Rio de janeiro - RJ
João Paulo Lopes - DBA

I do not know if I understood correctly, but I think you're talking about SQLERRM.

gives a search that on the internet has enough thing about it.

He returns the error code and the message.

Select all

  EXCEPTION 
          WHEN OTHERS 
          THEN 
             DBMS_OUTPUT.put_line (SQLERRM); 
        END; 
        /
You can also use it in an insert in your log table.

I hope I have helped.
scardofax
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 6
Joined: Wed, 28 Jan 2009 8:50 am
Location: Americana - SP
Juliano
Analista

I'vê seen this sqlerm, but that's not what I want, I need a function similar to or_sql_text ... only for the error .... more in any case, thanks
User avatar
dr_gori
Moderador
Moderador
Posts: 5026
Joined: Mon, 03 May 2004 3:08 pm
Location: Portland, OR USA
Contact:
Thomas F. G

Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered

I did not quite understand what you want.
But there is a table in the data dictionary that shows the errors of the objects:

Select all

select * from dba_errors 
where owner='APPS'
scardofax
Rank: Estagiário Pleno
Rank: Estagiário Pleno
Posts: 6
Joined: Wed, 28 Jan 2009 8:50 am
Location: Americana - SP
Juliano
Analista

It's almost this ... I want the error, only at run time, that is, when I compile the object I'll get the error in the table, it não is there, because the object error is added later, needed Something to get this error at run time.

More thanks
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest