JDBC 10g Does not Automatically set NLS_DATE_FORMAT (Doc ID 364243.1)

Last updated on MAY 19, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 9.2.0.7 to 11.2.0.3 [Release 9.2 to 11.2]
JDBC - Version 9.2.0.7 to 11.2.0.3.0 [Release 9.2 to 11.2]
Information in this document applies to any platform.
JDBC - Version: 9.2.0.7.0 to 11.2.0.3.0
This problem can occur on any platform.

Symptoms

When using the Oracle JDBC driver versions JDBC 9.2.0.7, 10.1.0.x, 10.2.0.x, 11.1.0.x, or 11.2.0.x, the driver sets NLS_LANGUAGE and NLS_TERRITORY based on Java Locale.

No other parameters are set, which means NLS_DATE_FORMAT is not set based on the Database setting.

When using the Oracle JDBC driver versions 8i through 9.2.0.6, the driver sets NLS_LANGUAGE and NLS_TERRITORY based on Java Locale.
NLS_DATE_FORMAT is set based on the default format in the database.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms