Saturday, March 28, 2009

Change locale and date format of Oracle XE in SQL*Plus

Want to change the default locale and date format in SQL*Plus with Oracle XE Universal to US english. The easiest way is to add two environment variables in Windows XP:
NLS_DATE_FORMAT=DD-MON-YYYY
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
Then start SQL*Plus:
C:\>sqlplus / as sysdba
SQL> select sysdate from dual;
SYSDATE
--------------------
28-MAR-2009

No comments: