I got ” ORA-01882 Timezone region not found ” error in Oracle database.
ORA-01882 Timezone region not found
Details of error are as follows.
ORA-01882 timezone region not found --------------------------------------------------------------------------- Cause: The specified region name was not found. Action: Contact Oracle Support Services.
timezone region not found
This ORA-01882 error is related with the specified region name was not found.
The ORA-01882 is due to a change of functionality in JDBC 11.2 in conjunction with a default timezone name/region on the client that is not supported by the database.
The change of functionality in JDBC 11.2 is to use timezone name/region directly if it is a known Oracle one rather than convert to a GMT offset. This is documented in:
Unpublished Bug 8435999 – PROVIDE SWITCH TO REVERT TO OLD SESSION TIMEZONE USAGE
Documentation Bug 9413359 – ORACLE.JDBC.TIMEZONEASREGION AND 11.2 CHANGE OF FUNCTIONALITY NOT DOCUMENTED .
According to unpublished Bug 8435999, the reason for the change is to avoid several daylight savings time (DST) related bugs. The individual bugs are not identified.
The default timezone name/region on the client, although intended to be “GMT”, was “Africa/Lome”. This does not exist until Oracle Time Zone File version 5. The database has only Time Zone version 4 (the default for a 10.2.0.4 database).
The default timezone name/region on the client was determined by running a java application that used
System.out.println(“Default TimeZone is: ” + TimeZone.getDefault());
On the machine where the ORA-01882 occurred, this displayed:
Default TimeZone is : sun.util.calendar.ZoneInfo[id=”Africa/Lome”,offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]”
On the machines where the ORA-01882 did not occur, this displayed:
Default TimeZone is : sun.util.calendar.ZoneInfo[id=”GMT”,offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
The database timezone version of 4 was determined by:
select version from v$timezone_file;
The addition of “Africa/Lome” in version 5 of the database timezone files is documented in:
Note 412160.1 – Updated DST transitions and new Time Zones in Oracle Time Zone File patches”.
Although it is not known why the default timezone on the one machine was “Africa/Lome” when it should have been “GMT” like on the other machines, differences in some binary timezone files were observed. On the machines where the default timezone was “GMT” and where the ORA-01882 did not occur, /etc/localtime and /usr/share/zoneinfo/GMT were identical but /usr/share/zoneinfo/Africa/Lome was different. However, on the machine where the ORA-01882 occurred, all three files were identical.
The solution is to use a timezone supported by the database. This can be done by setting the TZ environment variable. When TZ is set, its value will be used rather than the operating system default timezone.
The workaround is to set the connection property oracle.jdbc.timezoneAsRegion to “false”. This reverts to the old style of session timezone behavior.
547 views last month, 1 views today