Alter session on NLS_DATE_FORMAT being ignored

From: Danmath <danmath06_at_gmail.com>
Date: Thu, 24 Feb 2011 06:05:00 -0800 (PST)
Message-ID: <cd66eda0-30b6-41f1-bcd4-acd09d7a5910_at_o18g2000prh.googlegroups.com>



I'm issuing an alter session setting NLS_DATE_FORMAT in a C batch process right after the connection takes place. The format I specify is YYYYMMDDHH24MISS, this is the format used all over the process. In my development environment this works perfectly, but I've had problems in other environments.

CASE A development environment: The process works fine, $NLS_LANG and
$NLS_DATE_FORMAT environment variables are not set.

CASE B Test envirnonment 1: The process failed.

    $NLS_LANG=American_America.WE8ISO8859P1     $NLS_DATE_FORMAT environment variable is not set.       For some reason the $NLS_LANG variable seems to have more weight than the alter session command.. why?

      The process works fine after setting $NLS_DATE_FORMAT to the desired format.

CASE C Test envirnonment 2: The process failed. $NLS_LANG and
$NLS_DATE_FORMAT environment variables are not set. Can't get it to
work here. Any idea why? Received on Thu Feb 24 2011 - 08:05:00 CST

Original text of this message