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: SQL statements

Re: SQL statements

From: Jan Korecki <Jan.Korecki_at_contactor.se>
Date: Tue, 18 Nov 2003 19:47:49 +0100
Message-ID: <3fba6987$0$97842$57c3e1d3@news3.bahnhof.se>


Hello!

One way to do it is to join v$session with v$sqltext_with_newlines.

example:

SELECT

	username,
	sql_text
FROM
	v$session	ses,
	v$sqltext_with_newlines   sqt
WHERE
	sqt.hash_value = ses.sql_hash_value
AND	sqt.address = ses.sql_address

AND ses.username='JAN';

Dont forget to check out the oracle 8i reference manual: http://download-uk.oracle.com/docs/cd/A87860_01/doc/server.817/a76961/toc.htm

Regards,
Janne

news.working.it wrote:

> Hi,
>
> I have an instance of Oracle8i 8.1.7.3.0 on Windows 2000 and
> I'd like to know if I can get from the SGA (or somewhere else)
> all the recent SQL statements issued by a specific db user.
> I'd like to do that just with my SQLPlus (not with Toad !)
>
> Thanks,
> Iron
>
>
>
Received on Tue Nov 18 2003 - 12:47:49 CST

Original text of this message

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