Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Another tough question
Oh, well the sql is for the currenlty running queries. If you wanna do historical
SELECT sql_text FROM v$sqlarea WHERE executions > 0
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 Fri Jul 16 1999 - 12:15:03 CDT
![]() |
![]() |