Database: Oracle 12 C
MESSAGE desk with
Initially I had an issue when each columns have 32ok+32ok chars of knowledge. I had fastened it by making use of the
TO_CLOB operate and I’m able to write the output to the file with out truncating the consequence. (That is working solely when
All are English characters(Eg: SQL question consequence report accommodates round 64 Ok characters)
Mixture of French & English characters when the SQL question consequence report < 32Ok characters)
However when the BODY half is having French & English characters with anticipated SQL question consequence report > 32Ok characters, On this case, my question execution is failing with error code : 9.
Please assist me on find out how to repair this situation with out truncating the info.
Under is my Unix script code
export PATH export LD_LIBRARY_PATH export ORACLE_ACCESS #export NLS_LANG=.AL32UTF8 export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 output=$(sqlplus -S "$ORACLE_ACCESS" << EOF WHENEVER OSERROR EXIT 9; each time sqlerror exit sql.sqlcode; set NEWPAGE none set pagesize 0 set trimspool on set trimout on SET LINESIZE 32767 SET LONG 500000000 SET LONGCHUNKSIZE 100000000 set echo off set heading off set suggestions off set time period off set recsep off set serveroutput on measurement limitless SPOOL $FILE_NM APPEND choose '02~^'||TO_CLOB(EVENT_ID)||'~^'||BODY||'~^'||META_DATA||'~^'||'|^#' from MESSAGE the place ((CREATE_TS >= TO_DATE('01-Jan-2025','DD-MON-YYYY') and CREATE_TS < TO_DATE('01-Jan-2025','DD-MON-YYYY')+1) ORDER BY ROWID; SPOOL OFF exit; EOF )