467,915 Members | 1,166 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

creating a trigger on v$session.module

i've been trying to create an insert/update trigger on v_$session but
with no success. following is my code:

1 create or replace trigger trg_module
2 instead of insert or update on t_$session
3 begin
4 delete from t_modes;
5* end;
SQL> /

Trigger created.

(t_$session is a view of sys.v_$session).

as you can see the trigger compiles ok but the code ('delete ...') is
never run when there is a change in v$session. one explanations i got
was that you cannot put this trigger on a view of a fixed table/view.

the reason i'm doing this is to monitor changes in v$session.module
and then execute some code. if there is another way of achieving this
i would appreciate the advice.

regards,
Jul 19 '05 #1
  • viewed: 8063
Share:
2 Replies

"moklet" <ra*****@telkom.co.za> wrote in message
news:a8**************************@posting.google.c om...
i've been trying to create an insert/update trigger on v_$session but
with no success. following is my code:

1 create or replace trigger trg_module
2 instead of insert or update on t_$session
3 begin
4 delete from t_modes;
5* end;
SQL> /

Trigger created.

(t_$session is a view of sys.v_$session).

as you can see the trigger compiles ok but the code ('delete ...') is
never run when there is a change in v$session. one explanations i got
was that you cannot put this trigger on a view of a fixed table/view.

the reason i'm doing this is to monitor changes in v$session.module
and then execute some code. if there is another way of achieving this
i would appreciate the advice.

regards,

\
How about a log on trigger? You shouldn't put triggers on a sys object.
Jim
Jul 19 '05 #2
"Jim Kennedy" <ke****************************@attbi.net> wrote in message news:<DqGvc.12084$sI.5463@attbi_s52>...
"moklet" <ra*****@telkom.co.za> wrote in message
news:a8**************************@posting.google.c om...
i've been trying to create an insert/update trigger on v_$session but
with no success. following is my code:

1 create or replace trigger trg_module
2 instead of insert or update on t_$session
3 begin
4 delete from t_modes;
5* end;
SQL> /

Trigger created.

(t_$session is a view of sys.v_$session).

as you can see the trigger compiles ok but the code ('delete ...') is
never run when there is a change in v$session. one explanations i got
was that you cannot put this trigger on a view of a fixed table/view.

the reason i'm doing this is to monitor changes in v$session.module
and then execute some code. if there is another way of achieving this
i would appreciate the advice.

regards,

\
How about a log on trigger? You shouldn't put triggers on a sys object.
Jim


the problem with a log on trigger is that it will only be triggered
when i logon to the database. i am looking for something that will
always monitor changes in v$session.module and not just at log on.

is there another way that i can use to find out which module is
currently using a session?
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Michael O'Brien | last post: by
4 posts views Thread by tshad | last post: by
6 posts views Thread by Oliver | last post: by
2 posts views Thread by =?Utf-8?B?R2Vvc3Ns?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.