HI Craig, try these scripts
set linesize 200
column username format a15
column idle format a10
column machine format a22
column terminal format a15
column program format a15
select sid,
serial#,
username,
-- process,
to_char(logon_time,'DDth - HH24:MI:SS') logon,
terminal,
program,
-- floor(last_call_et/3600)||':'||
-- floor(mod(last_call_et,3600)/60)||':'||
-- mod(mod(last_call_et,3600),60) IDLE,
status
from v$session
where username is not null
order by sid
/
and to see what they are doing
column command format a60
column sid format 99
column serial# format 999999
SET PAGESIZE 100
set linesize 120
SELECT u.sid,
u.serial#,
SUBSTR(u.username,1,12) user_name,
s.sql_text command
FROM v$sql s,
v$session u
WHERE s.hash_value = u.sql_hash_value
AND sql_text not like '%from v$sql s, v$session u%'
and u.username is not null
ORDER BY
u.sid
/
If there is an application server involved you may not be able to pinpoint exactly who is logged in and from where, but for direct connections this works fine.
Hope this helps
Lisa Koivu
Oracle Database Administrator
Fairfield Resorts, Inc.
5259 Coconut Creek Parkway
Ft. Lauderdale, FL, USA 33063
-----Original Message-----
From: Craig Healey [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 09, 2003 9:40 AM
To: Multiple recipients of list ORACLE-L
Subject: Which session is killing performance?
Newbie question time:
We have 8.1.7 running on Win 2000 with about 50 users. The system has
just slowed down dramatically for about 5 minutes, with lots of user
complaints. I suspect one of the developers was loading data or doing
some DML. But how do I find who it is? I found a small piece of code on
AskTom that returned a user whose SQL has been running longer that x
seconds, but this wont necessarily be the user I'm looking for, will
it?. Is there something in v$session I should be looking at?
Any help appreciated
Craig Healey
**********************************************************************************
This email and any files transmitted with it are confidential and intended solely
for the use of the individual or entity to whom they are addressed and may contain
confidential and/or privileged material. Any review, retransmission, dissemination
or other use of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is prohibited. Statements
and opinions expressed in this e-mail may not represent those of the company.
If you have received this email in error please notify [EMAIL PROTECTED]
This footnote also confirms that this email message has been swept by MIMEsweeper
for the presence of computer viruses (www.mimesweeper.com)
***********************************************************************************
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Craig Healey
INET: [EMAIL PROTECTED]
Fat City Network Services -- 858-538-5051 http://www.fatcity.com
San Diego, California -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
