Re: Alter session on NLS_DATE_FORMAT being ignored

From: joel garry <joel-garry_at_home.com>
Date: Thu, 24 Feb 2011 09:29:12 -0800 (PST)
Message-ID: <f77c65c7-20a9-4cf8-8ddd-805deb56f2d5_at_l14g2000pre.googlegroups.com>



On Feb 24, 6:05 am, Danmath <danmat..._at_gmail.com> wrote:
> 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?

Need more info about your environments. Are you using a particular shell? Are the environments that are starting up the databases the same? Are you submitting the statements in the same sessions? How exactly? Shared server? OS and version? Oracle version and patch level?

Instrument a display of the session and db settings in your code.

jg

--
_at_home.com is bogus.
Give a man a fish and you've fed him for a day.
Teach a man to fish and you've fed him for a lifetime, until
environmental degradation affects his livelihood.
Received on Thu Feb 24 2011 - 11:29:12 CST

Original text of this message