1 Reply Latest reply on Jun 30, 2015 7:02 PM by Gary Graham-Oracle

    sqlcl ignores NLS_LANG on Win7

    andriy

      Hello.


      It looks like sqlcl (4.2.0.15.177.0246) ignores predefined variable NLS_LANG and uses system setting for it:


      C:\Users\admitr>set NLS

      Environment variable NLS not defined

       

       

      C:\Users\admitr>set NLS_LANG=AMERICAN_AMERICA.CL8MSWIN1251

       

       

      C:\Users\admitr>Apps\sqlcl\bin\sql admitr@dev1

       

       

      SQLcl: Release 4.1.0 Release Candidate on тЄ ўхЁт. 30 14:43:33 2015

       

       

      Copyright (c) 1982, 2015, Oracle.  All rights reserved.

       

       

       

       

      Password? (**********?) *************

      Connected to:

      Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

      With the Partitioning, OLAP, Data Mining and Real Application Testing options

       

       

      ADMITR @ dev1> select * from nls_session_parameters;

       

       

      PARAMETER                VALUE

      NLS_LANGUAGE             UKRAINIAN

      NLS_TERRITORY            UKRAINE

      NLS_CURRENCY             уЁэ.

      NLS_ISO_CURRENCY         UKRAINE

      NLS_NUMERIC_CHARACTERS   ,

      NLS_CALENDAR             GREGORIAN

      NLS_DATE_FORMAT          DD.MM.RRRR

      NLS_DATE_LANGUAGE        UKRAINIAN

      NLS_SORT                 UKRAINIAN

      NLS_TIME_FORMAT          HH24:MI:SSXFF

      NLS_TIMESTAMP_FORMAT     DD.MM.RRRR HH24:MI:SSXFF

      NLS_TIME_TZ_FORMAT       HH24:MI:SSXFF TZR

      NLS_TIMESTAMP_TZ_FORMAT  DD.MM.RRRR HH24:MI:SSXFF TZR

      NLS_DUAL_CURRENCY        ъЁс.

      NLS_COMP                 BINARY

      NLS_LENGTH_SEMANTICS     BYTE

      NLS_NCHAR_CONV_EXCP      FALSE

       

      17 rows selected


      ADMITR @ dev1>

        • 1. Re: sqlcl ignores NLS_LANG on Win7
          Gary Graham-Oracle

          But it seems the same is true of SQL*Plus.  See this blog: What is the current setting of NLS_LANG in sqlplus? | Laurent Schneider

           

          By the way, Laurent's technique from Oracle Support worked fine for me with an 11.2 SQL*Plus client, but does not work in SQLcl: 

          C:\Tools>sqlplus hr/hr@xe

           

          SQL*Plus: Release 12.1.0.1.0 Production on Tue Jun 30 11:43:54 2015

           

          Copyright (c) 1982, 2013, Oracle.  All rights reserved.

           

           

          Connected to:

          Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

           

          SQL> @.[%NLS_LANG%]

          SP2-0310: unable to open file ".[AMERICAN_AMERICA.WE8MSWIN1252]"

          SQL>quit

          Disconnected from Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

           

          C:\Tools>cd 411\sqlcl\bin

          C:\Tools\411\sqlcl\bin>sql hr/hr@//localhost:1521/XE

           

          SQLcl: Release 4.1.0 Release Candidate on Tue Jun 30 11:42:12 2015

           

          Copyright (c) 1982, 2015, Oracle.  All rights reserved.

           

           

          Connected to:

          Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

           

           

          SQL> @.[%NLS_LANG%]

           

          Error starting at line : 1 in command -

          @.[%NLS_LANG%]

          Error report -

          SP2-0310: Unable to open file: ".[%NLS_LANG%]"