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

Home -> Community -> Usenet -> c.d.o.server -> Re: CURSOR_SHARING=SIMILAR

Re: CURSOR_SHARING=SIMILAR

From: Brian Peasland <dba_at_nospam.peasland.net>
Date: Thu, 3 Aug 2006 21:06:06 GMT
Message-ID: <J3FxA9.7Dx@igsrsparc2.er.usgs.gov>


Sethu wrote:
> Hi,
>
> I am using Oracle 9i (9.2.0.6) on HPUX. I have the CURSOR_SHARING
> parameter set to SIMILAR and on testing I believe I may have some
> issues.
>
> SQL> alter session set cursor_sharing = 'EXACT';
>
> Session altered.
>
> SQL> select 'AAA' from dual;
>
> 'AA
> ---
> AAA
>
> SQL> alter session set cursor_sharing = 'SIMILAR';
>
> Session altered.
>
> SQL> select 'AAA' from dual; --- <== found from cache
>
> 'AA
> ---
> AAA
>
> SQL> select 'BBB' from dual; -- <== brand new one, notice the
> size of the returned value
>
> 'BBB'
> --------------------------------
> BBB
>
> I read an article in asktom site about this which explains the reason
> as Oracle binds the literal string to a variable length constant. My
> question is can it create a problem, if my application looking for Y/N
> values coming back and the sql returned 'Y ' ?
>

Your output is different due to the way that SQL*Plus formats column widths by default. Your application should not have any problems since how it formats output is most likely different than SQL*Plus.

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Thu Aug 03 2006 - 16:06:06 CDT

Original text of this message

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