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: trace sql without session_id and serial#

Re: trace sql without session_id and serial#

From: Steve Robin <ocmaman_at_gmail.com>
Date: Fri, 27 Jul 2007 00:06:26 -0700
Message-ID: <1185519986.362363.213890@q75g2000hsh.googlegroups.com>


On Jul 26, 5:50 pm, gazzag <gar..._at_jamms.org> wrote:
> On 26 Jul, 12:59, Steve Robin <ocma..._at_gmail.com> wrote:
>
>
>
>
>
> > On Jul 26, 2:03 pm, gazzag <gar..._at_jamms.org> wrote:
>
> > > On 26 Jul, 08:14, Steve Robin <ocma..._at_gmail.com> wrote:
>
> > > > My current database so many users are connected. SQL trace is off. I
> > > > need to trace a developer session. I just have osname and username.
> > > > Session is not connected right now. As soon as he connects some sql
> > > > fired from that session. I know how trace it after he connects I can
> > > > see session info from v$session but without knowing session id and
> > > > serial#, how can I trace with osuser and username only.
>
> > > > I cann't restart database, because so many people are working on it.
>
> > > > Oracle Database : 9.2.0.8
> > > > OS : Windows 2000
>
> > > Logon trigger:http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5...
>
> > > HTH
>
> > > -g
>
> > I did the same..... but it is not working, following is my code.
>
> > create or replace trigger logon_audit_trigger
> > AFTER LOGON ON DATABASE
> > declare
> > ALLOW number;
> > BEGIN
> > select count(1) into allow from trace_user where
> > upper(osuser)=upper(sys_context('USERENV', 'OS_USER')) and
> > upper(useris)=upper(user);
> > if allow <> 0 then
> > execute immediate 'alter session set sql_trace=true';
> > end if;
> > end;
> > /
>
> > or I am not able to find whether tracing is getting enabled or not.
> > how to check session's parameters.- Hide quoted text -
>
> > - Show quoted text -
>
> The relevant trace files will be generated in the directory that is
> output by the following SQL*Plus command:
>
> SQL> show parameter user_dump_dest
>
> HTH
>
> -g- Hide quoted text -
>
> - Show quoted text -

User doesnot have admin privileges.
SCOTT ----- OEMREP> show parameter user_dump_dest ORA-00942: table or view does not exist

How to see whether tracing in on or off from user session. Received on Fri Jul 27 2007 - 02:06:26 CDT

Original text of this message

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