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

Home -> Community -> Usenet -> c.d.o.server -> Re: Listing Open Cursors

Re: Listing Open Cursors

From: Olivier Bercovitz <oberco_at_club-internet.fr>
Date: 1998/03/16
Message-ID: <350D8B0C.8755A0BB@club-internet.fr>#1/1

Hello Chuck

Try these statements

  1. to get user-sql statements order by logical reads select username, sql_text, buffer_gets Gets, buffer_gets/executions lr from v$sqlarea, v$session where address = sql_address and username is not null and executions > 0 order by lr desc;
  2. to get user-sql statements order by physical reads select username, sqltext, disk_reads Reads, executions, disk_reads/executions pr from v$sqlarea, v$session where address = sql_address and username is not null and executions > 0 order by pr desc
  3. to get a complete user-sql statements select username, sql_text, sorts, disk_reads, buffer_gets from v$sqlarea , v sys.dba_users d where v.parsing_user_id = d.user_id and users_executing > 0 order by username;

Regards. Olivier

Chuck Salvo wrote:

> Is it possible to get specific information on Open Cursors,
> such as the SQL statement, when it was opened, which user, etc?
>
> We're trying to track program usage, and may have to
> repair an Open Cursor "leak".
>
> --
>
> SGS Information Engineering
> The World of Null A http://www.nulla-world.com
Received on Mon Mar 16 1998 - 00:00:00 CST

Original text of this message

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