Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to reset after Alter Session
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:
>
>
![]() |
![]() |