473,404 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 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 8504

"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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.