472,779 Members | 2,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

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
2 8424

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: RooLoo | last post by:
Hey all In my GLOBAL.ASA file I'm trying to create a session variable for reference in the various webpages of my site.... Sub Session_OnStart Session("LoggedOn")="Y" End Sub When...
0
by: Michael O'Brien | last post by:
I'm trying to hook in a specialized state store server into ASP.NET. I understand I can create a HttpModule and hook the events OnAcquireState and OnReleaseState. So far so good. But, it seems...
9
by: kermit | last post by:
I keep seeing that you can use the FileSystemObject in either VB script, or Javascript on an aspx page. I added a refrence to the scrrun.dll I added importing namespaces for 'System.Object',...
7
by: coleenholley | last post by:
Hi all :-) I have a couple of web pages created using ASP.Net and VB code-behind. We use a connection call through an RPC to COBOL, NOT an SQL connection, so my connection to get the data is done...
4
by: tshad | last post by:
I am trying to set up an Image authorization where you type in the value that is in a picture to log on to our site. I found a program that is supposed to do it, but it doesn't seem to work. ...
11
by: tracy | last post by:
Hi, I really need help. I run this script and error message appeal as below: drop trigger log_errors_trig; drop trigger log_errors_trig ERROR at line 1: ORA04080: trigger 'LOG_ERRORS-TRIG'...
2
by: moklet | last post by:
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...
6
by: Oliver | last post by:
I'm fairly new to DB2. I have been assigned to build a delete trigger that finds the data type of each of the table's fields so that the trigger can then build a string consisting of OLD values...
2
by: =?Utf-8?B?R2Vvc3Ns?= | last post by:
Dear All, I try to change a master page in the OnPreInit in a asp.net page. (Session variable is guaranteed to have been assigned) protected override void OnPreInit(EventArgs e){ if...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.