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.
Best Answer
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.