Oracle Instant Clientでは、ローカルまたはリモートのOracle Databaseにアプリケーションを接続して、開発および本番環境への導入が可能です。Instant Clientライブラリは、基本的なデータ機能とハイエンドなデータ機能に加えて、必要なクライアントネットワーク接続も備えているため、Oracle Databaseを余すところなく活用できます。Node.js、Python、PHPのような人気のある言語や環境で使われるOracle APIを下から支え、OCI、OCCI、JDBC、ODBC、Pro*Cにもアクセスできます。SQL*Plus、SQL*Loader、Oracle Data Pumpなど、Instant Clientに含まれるツールでは、データに迅速で便利にアクセスできます。
-
Oracle Instant Clientの利点
- zip ファイルまたは RPM パッケージで簡単にインストールできます。
- ストレージ容量は、Full Client と比較して大幅に削減されます。
- アプリケーションの機能やパフォーマンスは失われません。
- 独立系ソフトウェアベンダーがアプリケーションをパッケージ化することが容易になります。 -
推奨されるOracle Instant Client
オラクルは、Oracle Instant ClientまたはOracle Database Clientの最新の23ai Release Updateを使用することを推奨します。これは長期サポート・リリースです。
- 現在のデータベース・リリースのリリース・スケジュール
- 異なるOracleバージョンのクライアント/サーバー相互運用性サポート・マトリックス
パッケージ | 内容 |
---|---|
Basic | Oracle DatabaseでOCI、OCCI、JDBC OCIアプリケーションを実行するのに必要なすべてのファイル |
Basic Light | Basicパッケージの簡易バージョン。英語のエラー・メッセージとUnicode、ASCII、西欧キャラクタ・セットのみをサポート |
SDK | OCIおよびOCCIアプリケーションを開発するための追加のヘッダー・ファイルとmakefileサンプル |
SQL*Plus | SQLとPL/SQLの文およびスクリプトを実行するためのSQL*Plusコマンドライン・ツールを備える追加のパッケージ |
Tool | Data Pump、SQL*Loader、Workload Replay Clientなどの追加のツール |
ODBC | ODBCを備える追加ライブラリ |
コンパイラ | Pro*CおよびPro*COBOLプリコンパイラを備える追加ツールとライブラリ |
JDBC Supplement | 国際化に対応するための追加ライブラリ |
Workload Replay Client (WRC), Data Guard command-line interface (DGMGRL)などは、インスタントではなく Full Client をインストールする必要があります。
Full Client インストールはこちら
ということで、Oracle Linux へ Oracle Database Instant Clientをインストールしてみてみます。
■ Oracle Instant Client Download
今回は、Oracle Instant Client for Linux x86-64 (64-bit) の Basic Package と SQL*Plus Package をダウンロードします。
・ Oracle Instant Client Downloads
1) Basic Package (ZIP) Download
[opc@client-inst ~]$ wget https://download.oracle.com/otn_software/linux/instantclient/2390000/instantclient-basic-linux.x64-23.9.0.25.07.zip
--2025-09-02 06:08:13-- https://download.oracle.com/otn_software/linux/instantclient/2390000/instantclient-basic-linux.x64-23.9.0.25.07.zip
Resolving download.oracle.com (download.oracle.com)... 23.221.196.142
Connecting to download.oracle.com (download.oracle.com)|23.221.196.142|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 131515656 (125M) [application/zip]
Saving to: ‘instantclient-basic-linux.x64-23.9.0.25.07.zip’
instantclient-basic-linux.x64-23. 100%[===========================================================>] 125.42M 18.2MB/s in 8.0s
2025-09-02 06:08:22 (15.7 MB/s) - ‘instantclient-basic-linux.x64-23.9.0.25.07.zip’ saved [131515656/131515656]
[opc@client-inst ~]$
2) SQL*Plus Package (ZIP) Download
[opc@client-inst ~]$ wget https://download.oracle.com/otn_software/linux/instantclient/2390000/instantclient-sqlplus-linux.x64-23.9.0.25.07.zip
--2025-09-02 06:08:43-- https://download.oracle.com/otn_software/linux/instantclient/2390000/instantclient-sqlplus-linux.x64-23.9.0.25.07.zip
Resolving download.oracle.com (download.oracle.com)... 23.221.196.142
Connecting to download.oracle.com (download.oracle.com)|23.221.196.142|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5578233 (5.3M) [application/zip]
Saving to: ‘instantclient-sqlplus-linux.x64-23.9.0.25.07.zip’
instantclient-sqlplus-linux.x64-2 100%[===========================================================>] 5.32M 4.27MB/s in 1.2s
2025-09-02 06:08:46 (4.27 MB/s) - ‘instantclient-sqlplus-linux.x64-23.9.0.25.07.zip’ saved [5578233/5578233]
[opc@client-inst ~]$ ls -l
total 167628
-rw-rw-r--. 1 opc opc 34550540 Apr 5 15:40 hammerdb-5.0-1.el8.x86_64.rpm
-rw-rw-r--. 1 opc opc 131515656 Jul 31 12:16 instantclient-basic-linux.x64-23.9.0.25.07.zip
-rw-rw-r--. 1 opc opc 5578233 Jul 31 12:16 instantclient-sqlplus-linux.x64-23.9.0.25.07.zip
■ Oracle Instant Client Install
● SQL*Plus Install
[opc@client-inst ~]$ unzip instantclient-basic-linux.x64-23.9.0.25.07.zip
[opc@client-inst ~]$ unzip instantclient-sqlplus-linux.x64-23.9.0.25.07.zip
[opc@client-inst ~]$ ls -l
total 167632
-rw-rw-r--. 1 opc opc 34550540 Apr 5 15:40 hammerdb-5.0-1.el8.x86_64.rpm
drwxrwxr-x. 3 opc opc 4096 Sep 2 06:11 instantclient_23_9
-rw-rw-r--. 1 opc opc 131515656 Jul 31 12:16 instantclient-basic-linux.x64-23.9.0.25.07.zip
-rw-rw-r--. 1 opc opc 5578233 Jul 31 12:16 instantclient-sqlplus-linux.x64-23.9.0.25.07.zip
drwxrwxr-x. 2 opc opc 64 Sep 2 06:11 META-INF
[opc@client-inst ~]$ ls -ld instantclient_23_9
drwxrwxr-x. 3 opc opc 4096 Sep 2 06:11 instantclient_23_9
[opc@client-inst ~]$ ls -l instantclient_23_9/libclntsh.so*
lrwxrwxrwx. 1 opc opc 17 Sep 2 06:10 instantclient_23_9/libclntsh.so -> libclntsh.so.23.1
lrwxrwxrwx. 1 opc opc 17 Sep 2 06:10 instantclient_23_9/libclntsh.so.10.1 -> libclntsh.so.23.1
lrwxrwxrwx. 1 opc opc 17 Sep 2 06:10 instantclient_23_9/libclntsh.so.11.1 -> libclntsh.so.23.1
lrwxrwxrwx. 1 opc opc 17 Sep 2 06:10 instantclient_23_9/libclntsh.so.12.1 -> libclntsh.so.23.1
lrwxrwxrwx. 1 opc opc 17 Sep 2 06:10 instantclient_23_9/libclntsh.so.18.1 -> libclntsh.so.23.1
lrwxrwxrwx. 1 opc opc 17 Sep 2 06:10 instantclient_23_9/libclntsh.so.19.1 -> libclntsh.so.23.1
lrwxrwxrwx. 1 opc opc 17 Sep 2 06:10 instantclient_23_9/libclntsh.so.20.1 -> libclntsh.so.23.1
lrwxrwxrwx. 1 opc opc 17 Sep 2 06:10 instantclient_23_9/libclntsh.so.21.1 -> libclntsh.so.23.1
lrwxrwxrwx. 1 opc opc 17 Sep 2 06:10 instantclient_23_9/libclntsh.so.22.1 -> libclntsh.so.23.1
-rwxr-xr-x. 1 opc opc 96788880 Jul 24 18:05 instantclient_23_9/libclntsh.so.23.1
● ORACLE環境変数設定
1) .bash_profile 設定
今回は、.bash_profile へ設定します。
[opc@client-inst ~]$ vi ~/.bash_profile
export ORACLE_HOME=/home/opc/instantclient_23_9
export LD_LIBRARY_PATH=$ORACLE_HOME/
export ORACLE_LIBRARY=$ORACLE_HOME/libclntsh.so
export ORACLE_SID=CDB
export PATH=$ORACLE_HOME:$PATH
[opc@client-inst ~]$ cat .bash_profile
・・・
export ORACLE_HOME=/home/opc/instantclient_23_9
export LD_LIBRARY_PATH=$ORACLE_HOME/
export ORACLE_LIBRARY=$ORACLE_HOME/libclntsh.so
export ORACLE_SID=CDB
export PATH=$ORACLE_HOME:$PATH
2) .bash_profile 設定反映
[opc@client-inst ~]$ source .bash_profile
[opc@client-inst ~]$ env | grep ORA
ORACLE_SID=CDB
ORACLE_HOME=/home/opc/instantclient_23_9
ORACLE_LIBRARY=/home/opc/instantclient_23_9/libclntsh.so
■ Oracle Database接続
● SQL*Plus DB接続確認
事前に作成してある Databaseへ 簡易接続構文での Easy Connect Plus接続テスト
・参考: Easy Connect Plus
[opc@client-inst ~]$ sqlplus system/Password@//oracledb.clientsubnet.vcndbashburn.oraclevcn.com:1521/PDB.paas.oracle.com
SQL*Plus: Release 23.0.0.0.0 - Production on Tue Sep 2 09:14:38 2025
Version 23.9.0.25.07
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Last Successful login time: Tue Sep 02 2025 07:24:00 +00:00
Connected to:
Oracle Database 23ai EE Extreme Perf Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems
Version 23.9.0.25.07
SQL> show con_name
CON_NAME
------------------------------
PDB
SQL>
● ORACLE*NET設定
1) tnsnames.ora 設定
事前に作成した Database用の接続記述子を設定します。
[opc@client-inst ~]$ mkdir -p $ORACLE_HOME/network/admin
[opc@client-inst ~]$ vi $ORACLE_HOME/network/admin/tnsnames.ora
[opc@client-inst ~]$ cat $ORACLE_HOME/network/admin/tnsnames.ora
PDB=(DESCRIPTION=(CONNECT_TIMEOUT=5)(TRANSPORT_CONNECT_TIMEOUT=3)(RETRY_COUNT=3)(ADDRESS_LIST=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=10.110.1.229)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.110.1.14)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.110.1.214)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=PDB.paas.oracle.com)))
2) tnsnames.ora 設定確認
tnsnames.ora 設定が sqlplusで接続できるか確認
[opc@client-inst ~]$ sqlplus system/Password@pdb
SQL*Plus: Release 23.0.0.0.0 - Production on Tue Sep 2 11:28:38 2025
Version 23.9.0.25.07
Copyright (c) 1982, 2025, Oracle. All rights reserved.
Last Successful login time: Tue Sep 02 2025 11:28:07 +00:00
Connected to:
Oracle Database 23ai EE Extreme Perf Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems
Version 23.9.0.25.07
SQL> show con_name
CON_NAME
------------------------------
PDB
異なるバージョンのOracle Instant ClientとOracle Database間の接続が可能になります。認定された構成については、My Oracle Supportノート207303.1を参照してください。Data Pumpなどのツールには、その他の制限事項が適用される場合があります。
■ 参考
・ Oracle Instant Client Downloads
・ Oracle Instant Client
・ WALLET_LOCATION
・ Oracle® Call Interface
・ SQL*Plus®
・ Data PumpとSQL*Loader
・ ODBC
・ Pro*C/C++
・ Pro*COBOL®
・ Oracle Database Instant Client for Oracle Linux
・ Oracle Instant Clientよくある質問
・ Easy Connect Plus
・ Database Client Installation Guide for LinuxLinux 用データベース クライアント インストール ガイド