Direct, simple SQL query results in “ORA-01406: fetched column value was truncated”

oracleoracle-12coracle-asmsqlplusview

All the information I've seen on this issue is always in regards to running a query via some other utility (e.g. TOAD); however, I am seeing this issue when I simply try to select * from v$asm_disk; on the SQLPLUS command line. I am running the query as SYSDBA and it fails. If I log in to the ASM instance as SYSASM, I am able to run select * from v$asm_disk;. I have two boxes with identical OS and kernel versions, that were set up in the same manner.

Ultimately the issue comes from not being able to query the underlying fixed view which is used to create this view, X$KFDSK_STAT. On one server, as SYSDBA I can query that view, and on the other, I cannot.

Has anyone seen this before?

Thanks

Best Answer

From what I’ve found, there is a special character in the label on the instance that doesn't work and throwing the error.

Instance causing issues

SQL> SELECT ASMNAME_KFDSK, FAILNAME_KFDSK, LABEL_KFDSK FROM x$kfdsk;

ASMNAME_KFDSK                  FAILNAME_KFDSK                 LABEL_KFDSK
------------------------------ ------------------------------ -------------------------------
DG01_DATA_0000                 DG01_DATA_0000                 ▒▒▒▒▒u▒▒▒▒▒
DG01_DATA_0001                 DG01_DATA_0001

Instance working fine (From the +ASM instance)

SQL> SELECT ASMNAME_KFDSK, FAILNAME_KFDSK, LABEL_KFDSK FROM x$kfdsk;

ASMNAME_KFDSK                  FAILNAME_KFDSK                 LABEL_KFDSK
------------------------------ ------------------------------ -------------------------------
DG01_DATA_0000                 DG01_DATA_0000

ASM Provisioning String Has Junk Characters "kfdhdb.driver.provstr:ORCLDISKÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ " ( Doc ID 2088023.1 )