Why doesn't the NLS_DATE_FORMAT in my init.ora work sometimes

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


you need to put an "alter session set nls_date_format='yyyymmdd'" in your apps right after the connect


with Oracle8i, release 8.1 you can code:

create or replace trigger data_logon_trigger
after logon
    execute immediate
        'alter session set nls_date_format = ''yyyymmdd'' ';

as well.

All information and materials provided here are provided "as-is"; Oracle disclaims all express and implied warranties, including, the implied warranties of merchantability or fitness for a particular use. Oracle shall not be liable for any damages, including, direct, indirect, incidental, special or consequential damages for loss of profits, revenue, data or data use, incurred by you or any third party in connection with the use of this information or these materials.