Displaying session level parameters [message #592520] |
Fri, 09 August 2013 06:40 |
John Watson
Messages: 8960 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Does anyone happen to know a way to show session parameters? Such as
CONSTRAINTS
USE_STORED_OUTLINES
ROW ARCHIVE VISIBILITY
CURRENT_SCHEMA
I can detect the CURRENT_SCHEMA with a query against the userenv context, but I can't find any of the others there. Could there be an issue with these values being stored in PGA, and therefore not visible though any regular views? I did find an article that showed a query against an x$ data structure which showed something for different settings of CONSTRAINTS, but I can't find it again.
Thankyou for any insight.
|
|
|
Re: Displaying session level parameters [message #592532 is a reply to message #592520] |
Fri, 09 August 2013 08:14 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
Hi John,
Hope this helps.
For CONSTRAINTS, I tried with
select ksuseflg from x$ksuse where ksspaown=(select paddr from v$session where username = 'SYS');
I am not able to recollect properly, but in bits and pieces I remember that ksuseflg value could be interpreted to know the constraints status in session.
Found this interesting thing in OTN forum.
SQL> alter session set constraints=default;
Session altered.
SQL> select ksuseflg from x$ksuse where ksspaown=(select paddr from v$session where username = 'SYS');
KSUSEFLG
----------
65
SQL>
SQL> alter session set constraints=immediate;
Session altered.
SQL> select ksuseflg from x$ksuse where ksspaown=(select paddr from v$session where username = 'SYS');
KSUSEFLG
----------
262209
SQL> alter session set constraints=deferred;
Session altered.
SQL> select ksuseflg from x$ksuse where ksspaown=(select paddr from v$session where username = 'SYS');
KSUSEFLG
----------
131137
SQL> alter session set constraints=default;
Session altered.
SQL> select ksuseflg from x$ksuse where ksspaown=(select paddr from v$session where username = 'SYS');
KSUSEFLG
----------
65
Seems that there are two bits 0x00020000, 0x00040000 which mark the constraints status in session.
Here is the OTN thread
[Updated on: Sun, 02 March 2014 13:23] by Moderator Report message to a moderator
|
|
|
|
|