Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NLS_DATE_FORMAT on database level?

546644Mar 15 2007 — edited Mar 15 2007

Hi all,

I would like to change the NLS_DATE_FORMAT parameter so that the change will be reflected in the NLS_DATABASE_PARAMETERS view. I always thought it would be alter system, but that only changes it for all newly connecting sessions. Appearantly this can also be set on a database level. What is this database level? What does it mean if the two are different? See details below.

Thanx in advance,
Lennert

SQL> select * from nls_database_parameters where parameter like 
SQL> 'NLS_DA%';
 
PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_DATE_FORMAT                DD-MON-RR
NLS_DATE_LANGUAGE              AMERICAN
 
SQL> select * from nls_session_parameters where parameter like 
SQL> 'NLS_DA%';
 
PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_DATE_FORMAT                DD-MM-RR
NLS_DATE_LANGUAGE              DUTCH
 
SQL> alter system set nls_date_format='DD-MM-YYYY' scope = spfile;
 
System altered.
 
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup open
ORACLE instance started.
[...]
Database mounted.
Database opened.
SQL>  select * from nls_database_parameters where parameter like 
SQL> 'NLS_DA%';
 
PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_DATE_FORMAT                DD-MON-RR      ---> still the same, why?
NLS_DATE_LANGUAGE              AMERICAN     ---> still the same, why?
 
SQL> select * from nls_session_parameters where parameter like 
SQL> 'NLS_DA%';
 
PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_DATE_FORMAT                DD-MM-YYYY   ---> changed
NLS_DATE_LANGUAGE              DUTCH           ---> changed
 
SQL> 
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 12 2007
Added on Mar 15 2007
1 comment
647 views