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: Another tough question

Re: Another tough question

From: Doug Cowles <dcowles_at_bigfoot.com>
Date: Sun, 18 Jul 1999 02:43:35 -0400
Message-ID: <37917797.545CFB9D@bigfoot.com>


What is address and hash value? I guess hash value is to find out where in the shared pool the parsed sql is? What's address?

Alex Shnir wrote:

> The SQL statements can be found in v$sqlarea (hmm, this should do):
>
> select s.sid, s.username, X.sql_text
> from sys.v_$session S, sys.v_$sqlarea X
> where s.type != 'BACKGROUND'
> and s.sql_address = x.address
> and s.sql_hash_value = x.hash_value
> and sql_text not like 'commit%'
> order by s.sid
>
> From then on use whatever parser you can to find out the required information
>
> hope this helps
>
> Gawie Opperman wrote:
>
> > Hi!
> >
> > I need to know which columns are being used in select (yes I know
> > SELECT) statements
> > in an Oracle 7 database. Is there some way to see this?
> >
> > I've thought about triggers and auditing, but triggers is for
> > insert/update/delete only. And auditing can only tell one which tables
> > are being used in a select statement.
> >
> > Any help will be appreciated.
> >
> > Gawie Opperman
> >
> > --
> > "Things are only impossible until they aren't"
> > - Jean Luc Picard
Received on Sun Jul 18 1999 - 01:43:35 CDT

Original text of this message

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