Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to reset after Alter Session

Re: How to reset after Alter Session

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Fri, 24 Jan 2003 00:48:37 -0500
Message-ID: <v31ktpn4bm1a2d@corp.supernews.com>


or you could save the original state like this (an old trick)

col myvalue new_value orig_state
select value myvalue from v$parameter where name = 'sql_trace';

alter session set sql_trace = true;

alter session set sql_trace = &orig_state;

A decent modification and you can work this for a lot of cases.

Anurag

"Karsten Farrell" <kfarrell_at_belgariad.com> wrote in message news:ujVX9.2140$SZ.79_at_newssvr19.news.prodigy.com...
> Stephan Born wrote:
> > DA Morgan schrieb:
> >
> >> Sam wrote:
> >>
> >>> After I run ALTER SESSION.. such as
> >>>
> >>> ALTER SESSION SET SQL_TRACE = FALSE
> >>>
> >>> How do I set the session varible back to original state?
> >>>
> >>> Help?
> >>
> >>
> >> Is this a serious question?
> >>
> >> ALTER SESSION SET SQL_TRACE = TRUE
> >
> >
> > I think the original poster wanted to know how to get the original
> > state, change this with
> >
> > ALTER SESSION SET SQL_TRACE = FALSE
> >
> > and after doing his work change it back to the original state with
> > something like
> >
> > ALTER SESSION SET SQL_TRACE = <original state>
> >
> > This could be necessary when the original state can be one of both TRUE
> > or FALSE. Unfortunately, I do not know how to get the original state.
> > But I am interested in this, too.
> >
> > Regards, Stephan Born
> If you are correct in your assumption (to me, it sounds like you are),
> the OP might want to look at the following:

>

> http://www.oracleadvice.com/Tips/dbms_system.htm
>

> If you have enough privileges, you can use DBMS_SYSTEM.READ_EV to
> determine the current state of SQL_TRACE (event 10046).
> Received on Thu Jan 23 2003 - 23:48:37 CST

Original text of this message

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