Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: NLS_DATE_FORMAT: how to make setting persistent?
A copy of this was sent to Tim Romano <tim_at_ot.com>
(if that email address didn't require changing)
On Sun, 14 Mar 1999 09:13:53 -0500, you wrote:
>I'm a front-end application developer who has to do some DBA tasks
>now and then. While I know how to change the NLS_DATE_FORMAT in a
>session, we want to make it persistent. How does one safely
>change the INITxxxx.ORA settings so the format persists? Is there
>a text file that has to be edited? (I can see these values in TOAD
>from the View menu; can they be changed from within TOAD?) Do I
>have to bring the system down and back up again for the changes to
>stick?
>Thanks for the help.
>Tim
>
>
If the client sets the NLS_* parameters -- they override the server in all cases. In fact, if the client sets the NLS_LANG parameter -- that causes all NLS_* settings on the server to be ignored and the defaults for that NLS_LANG specified on the client on used.
Where that comes into play is typically if the client is windows and the server is unix. The client install on windows set the NLS_LANG parameter in the registry by default. This setting is different from the default you find for unix. Any NLS_* settings you put in the init.ora will *not* be used by those clients.
You have to set the NLS_DATE_FORMAT in the registry on the client
or
you need to put an "alter session set nls_date_format='yyyymmdd'" in your apps right after the connect
or
with Oracle8i, release 8.1 you can code:
create or replace trigger data_logon_trigger
after logon
ON DATABASE
begin
execute immediate
'alter session set nls_date_format = ''yyyymmdd'' ';
end;
/
as well.
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA
--
http://govt.us.oracle.com/ -- downloadable utilities