Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Monitoring sessions...

Re: Monitoring sessions...

From: Jeremiah Wilton <jeremiah_at_wolfenet.com>
Date: Sun, 28 Jan 2001 03:16:09 GMT
Message-ID: <9502tm$sth$1@nnrp1.deja.com>

Are you trying to record each session that logs in? How about a LOGIN trigger that records the information in a table? This feature is available in versions 8.1 and higher.

If you do it the way you suggest, you'll miss a lot of sessions that log in and out between the runs of your script. As for the schedule question, if you choose to use periodic runs of a scipt, you can make the pl/sql into a procedure and use dbms_job to schedule it with the Oracle instance.

As for how to catch exceptions, this is covered in the PL/SQL develpment guide. I bet you can find what you're looking for there.

HTH,

--
Jeremiah Wilton
http://www.wolfenet.com/~jeremiah

<rknettleton_at_qwest.net> wrote:


> I'm trying to create a script that will execute every 10-15 minutes
and
> simply query the v$session table and look for new sessions and place
the
> username, day and time in a table I've created. What I've done on
the table
> I created is make the three columns a unique key so I don't get
duplicate
> values. Here's where I have a problem. To test the script, I start a
> couple sessions and run the script. It populates the table fine the
first
> time. I then open another session and try the script again and it
will die
> because of the unique key. I want it to go through the script and if
it
> reaches the unique key exception, skip to the next row in my cursor.
>
> Unfortunately, I'm at home and my script is at work or I would have
copied
> it on this message.
>
> As I'm typing this another question came to mind. This is in an NT
> environment, so if I need to kick off the script every 15 minutes how
will I
> do that? WinAT doesn't allow for this type of schedule.
Sent via Deja.com http://www.deja.com/
Received on Sat Jan 27 2001 - 21:16:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US