Skip to content

Commit 502f37c

Browse files
yahondaclaude
andcommitted
Use 11g server's v14 timezone file via ORA_TZFILE
Approach: - Oracle 11g XE uses timezone v14; Instant Client 21.15 uses v35 - 11g's DBMS_DST doesn't support upgrading to v35 (GET_LATEST_TIMEZONE_VERSION was added in 12c), so we cannot upgrade the server - Instead, extract v14 files from the 11g container and point the client at them via ORA_TZFILE — client stays at 21.15, just uses v14 tz data - Use bare filename (not absolute path) for ORA_TZFILE since the file lives in oracore/zoneinfo/ under the Instant Client directory Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cdce4bf commit 502f37c

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/test_11g.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,19 @@ jobs:
6969
- name: Install JDBC Driver
7070
run: |
7171
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/233/ojdbc11.jar -O ./lib/ojdbc11.jar
72+
- name: Configure ORA_TZFILE to match Oracle 11g server
73+
run: |
74+
# Oracle 11g XE uses timezone file v14; Instant Client 21.15 embeds v35.
75+
# This mismatch causes ORA-01805 when ruby-oci8 fetches DATE/TIMESTAMP
76+
# values. Copy the v14 files from the 11g container and point the
77+
# Instant Client at them via ORA_TZFILE.
78+
ORACLE_CONTAINER=$(docker ps --filter "ancestor=gvenzl/oracle-xe:11" -q)
79+
sudo mkdir -p /opt/oracle/instantclient_21_15/oracore/zoneinfo
80+
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezlrg_14.dat /tmp/timezlrg_14.dat
81+
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezone_14.dat /tmp/timezone_14.dat
82+
sudo mv /tmp/timezlrg_14.dat /opt/oracle/instantclient_21_15/oracore/zoneinfo/
83+
sudo mv /tmp/timezone_14.dat /opt/oracle/instantclient_21_15/oracore/zoneinfo/
84+
echo "ORA_TZFILE=timezlrg_14.dat" >> $GITHUB_ENV
7285
- name: Create database user
7386
run: |
7487
./ci/setup_accounts.sh

0 commit comments

Comments
 (0)