Home » SQL & PL/SQL » SQL & PL/SQL » list of max open connections (11G)
list of max open connections [message #428630] Thu, 29 October 2009 04:15 Go to next message
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 #428632 is a reply to message #428630] Thu, 29 October 2009 04:17 Go to previous messageGo to next message
Michel Cadot
Messages: 64109
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Before posting please read OraFAQ Forum Guide.
Your title is quite rude, I modified it removing the UPPER case, stars and urgent word.

Regards
Michel

[Updated on: Thu, 29 October 2009 04:18]

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 Go to previous messageGo to next message
nida
Messages: 2
Registered: October 2009
Junior Member
Michel Cadot wrote on Thu, 29 October 2009 04:17
Before 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 #428636 is a reply to message #428630] Thu, 29 October 2009 04:27 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
V$SQL

V$SQLAREA

regards,
Delna
Re: list of max open connections [message #428921 is a reply to message #428630] Fri, 30 October 2009 14:55 Go to previous message
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;
Previous Topic: Oracle trim function not working in trigger (merged)
Next Topic: How to initialize array
Goto Forum:
  


Current Time: Mon Dec 05 08:47:11 CST 2016

Total time taken to generate the page: 0.07687 seconds