Re: output of a select statement

From: David Yu <mr.fishyu_at_gmail.com>
Date: Thu, 27 Mar 2014 10:48:51 +0800
Message-Id: <935F5975-8FEA-457D-B695-797E98D714A3_at_gmail.com>



Hi Jonathan,

Thank you for your explanation.

This really resolved my issue.

Rgds

David

在 2014-3-26,下午11:51,Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk> 写道:

>
> I don't think it's a bug - it's expected behaviour:
>
> SQL> alter session set cursor_sharing = exact;
>
> Session altered.
>
> SQL> select 'a' from dual;
>
> '
> -
> a
>
> 1 row selected.
>
> SQL> alter session set cursor_sharing = force;
>
> Session altered.
>
> SQL> select 'b' from dual;
>
> 'B'
> --------------------------------
> b
>
> 1 row selected.
>
> That's running 11.2.0.4
>
>
> When you set cursor_sharing to force or similar you are requesting Oracle to change your 'a' to a character bind variable - and the OCI interface uses 32, 128, 2000, and 4000 as the possible bind lengths. Since your requirement falls inside the 32 character limit it's being treated as a column of length 32.
>
>
> Try selecting 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' (should be 33 of them) and you should see a column width of 128 as the return length
>
>
>
> Regards
> Jonathan Lewis
> http://jonathanlewis.wordpress.com
> _at_jloracle
>
> ________________________________________
> From: oracle-l-bounce_at_freelists.org [oracle-l-bounce_at_freelists.org] on behalf of ORACLE-L [mr.fishyu_at_gmail.com]
> Sent: 26 March 2014 13:27
> To: fuzzy.graybeard_at_gmail.com; mwf_at_rsiz.com
> Cc: oracle-l_at_freelists.org
> Subject: Re: output of a select statement
>
> Thank you for your reply,there's another issue within 10.2.0.3,cursor_sharing set to similar or force will trigger the bug.after setting to exact,this issue fixed too.a bit strange :)
>
> Rgds
>
> David
>
> 在 2014-3-26,上午12:00,Hans Forbrich <fuzzy.graybeard_at_gmail.com> 写道:
>

>> On 25/03/2014 7:30 AM, ORACLE-L wrote:
>>> Hi Group,
>>> 
>>> I have two DBs10.2.0.4 running on Solaris 10.
>>> 
>>> And the output on these two databases are totally different from sqlplus:
>> Are these run from the same client?  Are they from a client on each machine or perhaps from a separate client?  What happens if you use the same client to access each DB?
>> 
>> Two things I would check to start
>> 
>> 1) Any login.sql/glogin.sql
>> 2) Language/Territory related settings at the client and on the Solaris machines.
>> 
>> /Hans
>> --
>> http://www.freelists.org/webpage/oracle-l

> --
> http://www.freelists.org/webpage/oracle-l
>
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
--
http://www.freelists.org/webpage/oracle-l
Received on Thu Mar 27 2014 - 03:48:51 CET

Original text of this message