SQL_TRACE

All posts relating to Oracle database administration.

Moderator: Tim...

SQL_TRACE

Postby Guest » Mon Nov 01, 2004 6:09 pm

hi
i have done this that if we set SQL_TRACE to TRUE all users's statements are traced at user_dump_dest...i want to know that if we want to on SQL_TRACE for a singlke session then ths use must set it on byt himself...so how can we force a user to do this...should we set it on in our application??? and if we do like this then how we will set it off for that session because it is hard coded in application..i dont understand to set it true for a session
second thing is if we dont set ir true stilli can see files at USER_DUMP_DEST...what are theese for??
Regards
Guest
 

RE:SQL_TRACE

Postby Tim... » Mon Nov 01, 2004 6:09 pm

Hi.

You can set it from your application using the "alter session" statement or the dbms_session package. See:

http://www.oracle-base.com/articles/8i/ ... In_Session

Alternatively, you can set it from a privileged session using the dbms_system package:

http://www.oracle-base.com/articles/8i/ ... In_Session

SQL trace can add quite an overhead so this should only be switched on for debuging purposes.

Alternatively, create a system trigger that switches SQL trace on when a session logs in.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17936
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle Database Administration

Who is online

Users browsing this forum: No registered users and 7 guests

cron