Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How can I see SQL executed by users?
DET wrote:
> I want to be able to see the full sql statements executed by a
> program. I've
> tried v$sqltext, but it's too short - cuts off the interesting parts.
>
> I don't have to see the stuff real-time. A log file would be fine. The
>
> server is 7.3.4, running on SCO OS5, and the client program is as
> well. Any
> advice?
Have you tried v$sql. select sql_text from v$sql which gets you the first 1000 chars. I believe you can also match up the users running queries. select username, user# from v$session to get the user#. Then select v$sql where parsing_user_id =<user#> which gets you which user is executing the query.
You can also set a session trace on for a particular user using exec dbms_system.set_sql_trace_in_session(sid, serial#, true/false) and then tkprof the trace file.
mkb Received on Tue Oct 13 1998 - 10:48:20 CDT
![]() |
![]() |