list of max open connections [message #428630] |
Thu, 29 October 2009 04:15  |
nida
Messages: 2 Registered: October 2009
|
Junior Member |
|
|
Hi Guys,
I need help in getting a query to list out all the Connections used by the database along with the queries.
eg:
Connection #1
Text: "Select * from....."
Please help me as this is very urgent.
Thanks in advance.
[Updated on: Thu, 29 October 2009 04:18] by Moderator Report message to a moderator
|
|
|
|
Re: list of max open connections [message #428633 is a reply to message #428632] |
Thu, 29 October 2009 04:19   |
nida
Messages: 2 Registered: October 2009
|
Junior Member |
|
|
Michel Cadot wrote on Thu, 29 October 2009 04:17Before posting please read
Your title is quite rude, I modified it removing the UPPER case, stars and urgent word.
Regards
Michel
Hi Michel,
I'm really sorry, I didn't mean for my first post here to be offensive. I'll take better care next time.
Sorry once again.
[Updated on: Thu, 29 October 2009 04:20] Report message to a moderator
|
|
|
|
Re: list of max open connections [message #428921 is a reply to message #428630] |
Fri, 30 October 2009 14:55  |
rodolpho
Messages: 6 Registered: August 2008 Location: Rio de Janeiro, Brazil
|
Junior Member |
|
|
Try it
select s.status "Status"
,s.program "Program"
,s.schemaname "Schema"
,s.osuser "User"
,s.machine "Machine"
,pr.spid "Process Id"
,round((pr.pga_used_mem / 1024)/1024,2) "Mem used (PGA) Mb"
,round((pr.pga_alloc_mem /1024)/1024,2) "Mem alloc (PGA) Mb"
,round(((pr.pga_used_mem / (select sum(pga_used_mem)
from V$PROCESS) * 100)/1024)/1024,10)||'%' "% usage (PGA)"
,s.terminal "Terminal"
,s.module "Module"
,s.service_name "Service Name"
,sq.sql_text "SQL Executed"
from v$session s
inner join v$sqlstats sq on (sq.sql_id = s.sql_id)
inner join v$process pr on (pr.addr = s.paddr)
order by s.osuser;
|
|
|