Skip to content

Commit 45321a9

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 bde761b commit 45321a9

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
@@ -73,6 +73,19 @@ jobs:
7373
- name: Install JDBC Driver
7474
run: |
7575
wget -q https://download.oracle.com/otn-pub/otn_software/jdbc/233/ojdbc11.jar -O ./lib/ojdbc11.jar
76+
- name: Configure ORA_TZFILE to match Oracle 11g server
77+
run: |
78+
# Oracle 11g XE uses timezone file v14; Instant Client 21.15 embeds v35.
79+
# This mismatch causes ORA-01805 when ruby-oci8 fetches DATE/TIMESTAMP
80+
# values. Copy the v14 files from the 11g container and point the
81+
# Instant Client at them via ORA_TZFILE.
82+
ORACLE_CONTAINER=$(docker ps --filter "ancestor=gvenzl/oracle-xe:11" -q)
83+
sudo mkdir -p /opt/oracle/instantclient_21_15/oracore/zoneinfo
84+
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezlrg_14.dat /tmp/timezlrg_14.dat
85+
docker cp "$ORACLE_CONTAINER":/u01/app/oracle/product/11.2.0/xe/oracore/zoneinfo/timezone_14.dat /tmp/timezone_14.dat
86+
sudo mv /tmp/timezlrg_14.dat /opt/oracle/instantclient_21_15/oracore/zoneinfo/
87+
sudo mv /tmp/timezone_14.dat /opt/oracle/instantclient_21_15/oracore/zoneinfo/
88+
echo "ORA_TZFILE=timezlrg_14.dat" >> $GITHUB_ENV
7689
- name: Create database user
7790
run: |
7891
./ci/setup_accounts.sh

0 commit comments

Comments
 (0)