Solved

Change cursor_sharing dynamically using sid and serial# of v$session

Posted on 2008-06-25
6
995 Views
Last Modified: 2013-12-18
Hi Experts,
I want to change cursor_sharing=FORCE in my session level, I dont want to use 'alter session set cursor_sharing=FORCE'. Is there any alternate for that something like dbms_system.set_int_param_in_session ?
0
Comment
Question by:Devinder Singh Virdi
  • 3
6 Comments
 
LVL 11

Expert Comment

by:mohammadzahid
ID: 21872110
alternate is

alternative alter session set create_stored_outlines=TRUE

goto this site for examples:

http://www.psoug.org/reference/outlines.html
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 22566057
I suggest delete with refund.

stored outlines aren't really equivalent to cursor sharing.
0
 
LVL 74

Accepted Solution

by:
sdstuber earned 50 total points
ID: 22566082
while not at all equivalent, stored outlines can be complimented by cursor sharing

they apply to specific queries so two queries with different literals would not be recognized for the purposes of outlines.

cursor sharing would allow more queries to use a given outline because the literals would be replaced with binds, allowing them to match an outlined query with binds.


However, to answer the virdi_ds's  question...

the boolean equivalent for dbms_system is...


  dbms_system.set_bool_param_in_session(:sid, :serial, 'cursor_sharing', TRUE);


Note, dbms_system has no permissions by default and is undocumented/unsupported by Oracle.
0
 
LVL 74

Expert Comment

by:sdstuber
ID: 22566086
Now that I've posted an answer, I rescind my suggestion of delete with refund.  :)

Hopefully my suggestion will be found acceptable.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question