I am having a very strange issue, i added the following line to my init.ora and restarted the database:
NLS_DATE_FORMAT='MM/DD/YYYY'
after this from the telnet unix window sqlplus i am getting the following:
select sysdate from dual;
SYSDATE
----------
04/18/2002
and
select * from v$nls_parameters
VALUE
----------------------------------------------------------------
NLS_DATE_FORMAT
MM/DD/YYYY
but when I connect to the same database from sqlplus on my machine here is what i get:
PARAMETER
----------------------------------------------------------------
VALUE
----------------------------------------------------------------
NLS_DATE_FORMAT
DD-MON-RR
select sysdate from dual;
SYSDATE
---------
18-APR-02
why are these different on my local machine???
but in the view v$parameter it shows the changed value:
mm/dd/yyyy
Please advise
Exists 2 level of NLS in oracle.
1. On server side, NLS may be setup in init.ora file (NLS_* parameters)
2. on client side (!! for each client mashine seperatly)
NLS parameters setup in:
-- unix client -- environment variables
-- winNT, Win9x -- in register (Oracle section)
U should check NLS_DATE_FORMAT or NLS_LANG parameters on ur masine.
If NLS_DATE_FORMAT don't setup then oracle impement default DATE_FORMAT from NLS_LANG (part territory)
Originally posted by pando hmm rather than two levels I guess it's three
database level
instance level
client side
Yes, sure, if we have OPS or RAC.
In this case we have 3 levels for all NLS parameters, exept "semi-NLS" parameter --> characterset.
-------------------------------------------
I not reccomed setup different NLS parameters for different instance of OPS.
It may create big problems with sort operations in parallel mode.
Thanx all of you for your replies, in registry i have only nls_lang set so that means the date_format is derived from the nls_lang value right?
I changed the nls_date_format as users were getting ora 1801 date format is too long for internal buffer.. will the change in server (init.ora) solve this issue..
Bookmarks