Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
 
Oracle 

Performance Tuning Reference poster
 
Oracle training in Linux 

commands
 
Oracle training Weblogic Book
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> How to see the open connection, How to see the open connection
saro_pebble
post Nov 11 2008, 06:05 AM
Post #1


Advanced Member
***

Group: Members
Posts: 68
Joined: 25-September 08
Member No.: 36,685



Hi All,

what is the sql query to see how many oracle connections are in open?

also which user is holding the max no of connections?

Please help me out.

Thanks
Saro
Go to the top of the page
 
+Quote Post
dave
post Nov 11 2008, 07:13 AM
Post #2


Advanced Member
***

Group: Members
Posts: 5,207
Joined: 8-October 04
Member No.: 785



look at v$session
Go to the top of the page
 
+Quote Post
burleson
post Nov 11 2008, 07:21 AM
Post #3


Advanced Member
***

Group: Members
Posts: 11,730
Joined: 26-January 04
Member No.: 13




Try this:

CODE
ttitle "dbname Database|UNIX/Oracle Sessions";

set heading off;

select 'Sessions on database '||substr(name,1,8) from v$database;

set heading on;

select
       substr(a.spid,1,9) pid,
       substr(b.sid,1,5) sid,
       substr(b.serial#,1,5) ser#,
       substr(b.machine,1,6) box,
       substr(b.username,1,10) username,
--       b.server,
       substr(b.osuser,1,8) os_user,
       substr(b.program,1,30) program
from v$session b, v$process a
where
b.paddr = a.addr
and type='USER'
order by spid;

ttitle off;

spool off;


If you don't want to write your own scripts, try the script collection, everything you could possibly need:

http://www.dba-oracle.com/oracle_scripts.htm


--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 28th November 2014 - 06:58 AM