Re: SQL_TRACE: How to stop it without rebooting

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/01/30
Message-ID: <34d556bf.4358467_at_192.86.155.100>#1/1


A copy of this was sent to agarwalm_at_bnr.ca (Manish Agarwal ) (if that email address didn't require changing) On 30 Jan 1998 21:21:34 GMT, you wrote:

>
>Hi,
>
> Is anybody know:
>How to stop SQL_TRACE without rebooting the machine?
>
>Basically what I knew is: I have to modify the <init.ora> & reboot
>the machine for the changes to take place i.e, SQL_TRACE=FALSE
>
>I am really interested to know if somebody is aware of any other technique.
>
>You can even mail me at:
>
>agarwalm_at_nortel.ca
>
>Thanks in advance.
>Manish.

sql_trace, when set in the init.ora file, cannot be turned off without taking it out of the init.ora file.

You might want to consider selectively enableing trace in your applications instead of tracing at the database level. If you issue "alter session set sql_trace = true" "alter session set sql_trace = false" in your applications (dbms_session.set_sql_trace(boolean) in pl/sql) you can just trace what you need to.

If you have an app that you cannot modify, you can always just start it and let it log in and then use

 procedure set_sql_trace_in_session(sid number, serial# number,

                                 sql_trace boolean);
  --  Enable sql_trace in the session identified by (sid, serial#).  These
  --  value are gotten from v$session.
  --  Input arguments:
  --   sid
  --      session id
  --   serial#
  --      session serial number
  --  sql_trace
  --      if true then enable tracing, if false disable tracing.
  --

to turn on tracing for that connection from 'outside' the program. the set_sql_trace_in_session is valid for 7.2 and up.  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Fri Jan 30 1998 - 00:00:00 CET

Original text of this message