RE: output of a select statement(B
From: Jonathan Lewis(B <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 26 Mar 2014 15:51:47 +0000
Message-ID: <CE70217733273F49A8A162EE074F64D901DE5F95_at_exmbx05.thus.corp>
Date: Wed, 26 Mar 2014 15:51:47 +0000
Message-ID: <CE70217733273F49A8A162EE074F64D901DE5F95_at_exmbx05.thus.corp>
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 $B:_(B 2014-3-26$B!$>e8a(B12:00$B!$(BHans Forbrich <fuzzy.graybeard_at_gmail.com> $B<LF;!'(B > 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 Received on Wed Mar 26 2014 - 16:51:47 CET