(Optional) Configuring the character set

AL16UTF16 is the default value of the National Character Set (NLS_NCHAR_CHARACTERSET) for the Oracle database. Cloudera recommends that you use the default NLS_NCHAR_CHARACTERSET. However, if needed, you can configure the National Character Set to UTF-8.

  1. Log in as the oracle user:
    su - oracle
  2. Start the listener control (as user oracle):
    $ORACLE_HOME/bin/lsnrctl start
  3. Log in to SQL*Plus:
    sqlplus / as sysdba
  4. Check whether the character set is AL32UTF8 and national character set is UTF8:
    SELECT * FROM v$nls_parameters where parameter like '%CHARACTERSET';
    To update, quit the shell and run these commands in a SQL*Plus script:
    vi alter_charset.ddl
    ## Save in alter_charset.ddl (script takes 2-3 minutes)
    CONNECT / as sysdba
    SHUTDOWN immediate
    STARTUP mount
    ALTER SYSTEM ENABLE RESTRICTED SESSION;
    ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0 SCOPE = MEMORY;
    ALTER SYSTEM SET AQ_TM_PROCESSES=0 SCOPE = MEMORY;
    ALTER DATABASE OPEN;
    ALTER DATABASE CHARACTER SET AL32UTF8;
    ALTER DATABASE NATIONAL CHARACTER SET INTERNAL_USE UTF8;
    SHUTDOWN immediate
    STARTUP
    
    sqlplus /nolog < alter_charset.ddl