Unix Technical Forum

retrieving the location of a database trigger call..

This is a discussion on retrieving the location of a database trigger call.. within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hi - in a 10g Oracle 'Before Insert or Update' trigger is there any way of find the source ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 12:40 PM
Nigel Curtis
 
Posts: n/a
Default retrieving the location of a database trigger call..


Hi - in a 10g Oracle 'Before Insert or Update' trigger is there any
way of find the source of the insert/update...? That is, the name of
any background process, SQL*Plus script or form which may have done
the insert/update..?

If such information isn't lost I'd like to try and use it as a
condition within the trigger but can't see any way of retrieving it.

many thanks, nigel

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 12:40 PM
sybrandb
 
Posts: n/a
Default Re: retrieving the location of a database trigger call..

On Apr 27, 12:22 pm, Nigel Curtis <cn_cur...@runbox.com> wrote:
> Hi - in a 10g Oracle 'Before Insert or Update' trigger is there any
> way of find the source of the insert/update...? That is, the name of
> any background process, SQL*Plus script or form which may have done
> the insert/update..?
>
> If such information isn't lost I'd like to try and use it as a
> condition within the trigger but can't see any way of retrieving it.
>
> many thanks, nigel


There are numerous attributes you can retrieve using the SYS_CONTEXT
function.
One of them is MODULE. This is the module you can set using
DBMS_APPLICATION_INFO.

Hth
--
Sybrand Bakker
Senior Oracle DBA

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 12:40 PM
DA Morgan
 
Posts: n/a
Default Re: retrieving the location of a database trigger call..

Nigel Curtis wrote:
> Hi - in a 10g Oracle 'Before Insert or Update' trigger is there any
> way of find the source of the insert/update...? That is, the name of
> any background process, SQL*Plus script or form which may have done
> the insert/update..?
>
> If such information isn't lost I'd like to try and use it as a
> condition within the trigger but can't see any way of retrieving it.
>
> many thanks, nigel


Additionally you can use DBMS_APPLICATION_INFO to set ACTION and
DBMS_SESSION's SET_CONTEXT.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 12:40 PM
Gints Plivna
 
Posts: n/a
Default Re: retrieving the location of a database trigger call..

Nigel Curtis wrote:
> Hi - in a 10g Oracle 'Before Insert or Update' trigger is there any
> way of find the source of the insert/update...? That is, the name of
> any background process, SQL*Plus script or form which may have done
> the insert/update..?
>
> If such information isn't lost I'd like to try and use it as a
> condition within the trigger but can't see any way of retrieving it.
>
> many thanks, nigel


check dbms_utility.format_call_stack
and
http://asktom.oracle.com/pls/asktom/...D:382218730166

Gints Plivna
http://www.gplivna.eu

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 07:15 AM.


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