Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- database: oracle
test_args: --test-threads=2
container: oracle
db_url: "Driver=Oracle 21 ODBC driver;Dbq=//127.0.0.1:1521/FREEPDB1;Uid=root;Pwd=Password123!"
db_url: "Driver=Oracle 23 ODBC driver;Dbq=//127.0.0.1:1521/FREEPDB1;Uid=root;Pwd=Password123!"
- database: duckdb
container: ""
db_url: "Driver=DuckDB;Database=/tmp/sqlpage-test.duckdb"
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
uses: actions/cache@v6
with:
path: ${{ runner.temp }}/sqlpage-oracle-instantclient-archives
key: oracle-instantclient-linux-x64-21.21.0.0.0-v1
key: oracle-instantclient-linux-x64-23.26.0.0.0-v1
- name: Install Oracle ODBC driver
if: matrix.database == 'oracle'
run: |
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# DATABASE_URL='postgres://root:Password123!@localhost/sqlpage'
# DATABASE_URL='mssql://root:Password123!@localhost/sqlpage'
# DATABASE_URL='mysql://root:Password123!@localhost/sqlpage'
# DATABASE_URL='Driver=Oracle 21 ODBC driver;Dbq=//127.0.0.1:1521/FREEPDB1;Uid=root;Pwd=Password123!'
# DATABASE_URL='Driver=Oracle 23 ODBC driver;Dbq=//127.0.0.1:1521/FREEPDB1;Uid=root;Pwd=Password123!'
# DATABASE_URL='Driver=DuckDB;Database=/tmp/sqlpage-test.duckdb'

# Run for instance:
Expand Down
33 changes: 21 additions & 12 deletions scripts/install-oracle-odbc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,52 @@ set -euo pipefail

cd "$(dirname "${BASH_SOURCE[0]}")/.."

# Keep the same client version as the RPM installation, without converting RPMs
# to Debian packages. CI caches the archives; verify them even on cache hits.
# Oracle Instant Client 23ai (23.26.x). 21c is an older innovation release;
# 23ai matches the database server used in CI (gvenzl/oracle-free:23.x)
# and may have fixed or changed the client cleanup path involved in the
# finiSqora exit hang. Download the official ZIPs instead of converting
# RPMs to Debian packages. CI caches the archives; verify them even on
# cache hits.
oracle_version="23.26.0.0.0"
oracle_build="2326000"
oracle_dir="instantclient_23_26"
oracle_driver="Oracle 23 ODBC driver"
oracle_so="libsqora.so.23.1"
archive_dir="${RUNNER_TEMP:-/tmp}/sqlpage-oracle-instantclient-archives"
install_dir="${RUNNER_TEMP:-/tmp}/sqlpage-oracle-instantclient"
mkdir -p "$archive_dir" "$install_dir"

for package in basic odbc; do
archive="instantclient-${package}-linux.x64-21.21.0.0.0dbru.zip"
archive="instantclient-${package}-linux.x64-${oracle_version}.zip"
if [[ ! -f "$archive_dir/$archive" ]]; then
curl --fail --location --remove-on-error --retry 3 --connect-timeout 15 \
--max-time 180 --output "$archive_dir/$archive" \
"https://download.oracle.com/otn_software/linux/instantclient/2121000/$archive"
--max-time 300 --output "$archive_dir/$archive" \
"https://download.oracle.com/otn_software/linux/instantclient/${oracle_build}/$archive"
fi
done

(
cd "$archive_dir"
sha256sum --check <<'CHECKSUMS'
9cd0d5d5619ddaac43aa2214bab48e84155ca7e057d937634d1909b298125e8a instantclient-basic-linux.x64-21.21.0.0.0dbru.zip
37e4326ac14b08d9130d499fe5c1ba58f8ad72e8196f5618c0dc5880a24d6a23 instantclient-odbc-linux.x64-21.21.0.0.0dbru.zip
d6c79cbcf0ff209363e779855c690d4fc730aed847e9198a2c439bcf34760af5 instantclient-basic-linux.x64-23.26.0.0.0.zip
e4e715d2dbf7f1c6907adceb8a62bea33d3ae2ae4466118df346b6c213af4fb4 instantclient-odbc-linux.x64-23.26.0.0.0.zip
CHECKSUMS
)

for package in basic odbc; do
unzip -oq "$archive_dir/instantclient-${package}-linux.x64-21.21.0.0.0dbru.zip" -d "$install_dir"
unzip -oq "$archive_dir/instantclient-${package}-linux.x64-${oracle_version}.zip" -d "$install_dir"
done
client_dir="$install_dir/instantclient_21_21"
client_dir="$install_dir/$oracle_dir"

# Ubuntu 24.04's libaio package uses a different SONAME from Oracle's client.
libaio_path="$(ldconfig -p | awk '$1 ~ /^libaio\.so\.1(t64)?$/ { path = $NF } END { print path }')"
test -n "$libaio_path"
ln -sf "$libaio_path" "$client_dir/libaio.so.1"

cat > "$install_dir/odbcinst.ini" <<EOF
[Oracle 21 ODBC driver]
Description=Oracle ODBC driver for Oracle 21
Driver=$client_dir/libsqora.so.21.1
[$oracle_driver]
Description=Oracle ODBC driver for Oracle 23
Driver=$client_dir/$oracle_so
EOF

{
Expand Down