Unix Technical Forum

after serverrror on database trigger

This is a discussion on after serverrror on database trigger within the Oracle Database forums, part of the Database Server Software category; --> system event trigger: after server error: i like to know if it possible to retrieve TEXT error and not ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-23-2008, 06:36 AM
Jon
 
Posts: n/a
Default after serverrror on database trigger

system event trigger: after server error: i like to know if it possible to
retrieve TEXT error and not only its code (server_error(1)) in a after
server_error trigger. Thanks


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-23-2008, 06:36 AM
Daniel Morgan
 
Posts: n/a
Default Re: after serverrror on database trigger

Jon wrote:

> system event trigger: after server error: i like to know if it possible to
> retrieve TEXT error and not only its code (server_error(1)) in a after
> server_error trigger. Thanks


Look at the demo at the bottom of the page at:
http://www.psoug.org/reference/system_trigger.html

Specifically: "IF (IS_SERVERERROR(1017)) THEN"

HTH

--
Daniel Morgan
http://www.outreach.washington.edu/e...ad/oad_crs.asp
http://www.outreach.washington.edu/e...oa/aoa_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-23-2008, 06:36 AM
Michel Cadot
 
Posts: n/a
Default Re: after serverrror on database trigger


"Jon" <aaa@bbb.ccc> a écrit dans le message de news:bvto8b$rr4$1@unbe.sarenet.es...
> system event trigger: after server error: i like to know if it possible to
> retrieve TEXT error and not only its code (server_error(1)) in a after
> server_error trigger. Thanks
>
>


With the error number you can get the message with sqlerrm.
Remember sqlerrm takes negative error number.

Regards
Michel Cadot


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-23-2008, 06:37 AM
Mark D Powell
 
Posts: n/a
Default Re: after serverrror on database trigger

"Jon" <aaa@bbb.ccc> wrote in message news:<bvto8b$rr4$1@unbe.sarenet.es>...
> system event trigger: after server error: i like to know if it possible to
> retrieve TEXT error and not only its code (server_error(1)) in a after
> server_error trigger. Thanks


I believe that depending on what exactly you want you could
potentially use the dbms_utility.FORMAT_ERROR_STACK function

or if you have the SQLCODE value then use the sqlerrm(v_SQLCODE) call
to get the short error description

HTH -- Mark D Powell --
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:42 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com