Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have several Oracle servers that exhibit a behavior I do not understand. I have identified a two node RAC in which one node exhibits the behavior, but the other node does not. RAC is not involved in the issue, but it dramatically reduces the differences between the servers experiencing the different behavior.

Why is the following output different?
Node 2 (expected behavior):

SQL> select 'a' from dual;

'
-
a

SQL>  select 'abc' from dual;

'AB
---
abc

Node 1 (unexpected behavior):

SQL> select 'a' from dual;

'A'
---
a

SQL>  select 'abc' from dual;

'ABC'
---------
abc

These nodes are connecting to different instances of the same database. I have done a show all on both and verified that the sqlplus settings are identical.

share|improve this question

1 Answer 1

I found this just before posting. The difference is the linux environment setting for NLS_LANG. It was set to American_America.UTF8 on the system it added padding to. Unsetting this on one and setting this on the other swapped where the behavior.

share|improve this answer
1  
Yeah, the latter will be multibyte hence the padding (increased column length). –  Phil Mar 12 at 0:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.