| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Another tough question
Oracle determines a hash value of every statement. This hash value
determines whether a statement already exists in the sqlarea. I would expect
address is the address in the sqlarea of the statement. This leaves the
question why address alone is non-unique.
Sybrand Bakker, Oracle DBA
Doug Cowles <dcowles_at_bigfoot.com> wrote in message
news:37917797.545CFB9D_at_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?
>
> - Dc.
>
> 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 - 06:42:17 CDT
![]() |
![]() |