oracle odbc for mac,Instant Client for macOS (Intel x86)

Download the desired Instant Client ZIP files. All installations require the Basic or Basic Light package.

Unzip the packages into a single directory such as "~/instantclient_12_1". For example, to use SQL*Plus:

cd ~

unzip instantclient-basic-macos.x64-12.1.0.2.0.zip

Create the appropriate libclntsh.dylib link for the version of Instant Client. For example:

cd ~/instantclient_12_1

ln -s libclntsh.dylib.12.1 libclntsh.dylib

OCCI programs will additionally need:

ln -s libocci.dylib.12.1 libocci.dylib

Add links to ~/lib or /usr/local/lib to enable applications to find the libraries. For example, OCI based applications could do:

mkdir ~/lib

ln -s ~/instantclient_12_1/libclntsh.dylib ~/lib/

ln -s ~/instantclient_12_1/libclntsh.dylib.12.1 ~/lib/

Alternatively, copy the required libraries. For example, to use OCI applications:

mkdir ~/lib

cp /opt/oracle/instantclient_12_1/libclntsh.dylib.12.1 ~/lib/

cp /opt/oracle/instantclient_12_1/libclntshcore.dylib.12.1 ~/lib/

cp /opt/oracle/instantclient_12_1/libons.dylib ~/lib/

cp /opt/oracle/instantclient_12_1/libnnz12.dylib ~/lib/

cp /opt/oracle/instantclient_12_1/libociei.dylib ~/lib/

Note: Custom OCI applications, such as those that bundle Instant Client, may want to link with -rpath set to the directory containing Instant Client 12.1 instead of relying on libraries being in ~/lib.

To be able to run SQL*Plus, update PATH. For example:

export PATH=~/instantclient_12_1:$PATH

Run SQL*Plus and connect using your database credentials and connection string:

sqlplus hr/welcome@localhost/orclpdb

Installing Instant Client 11.2 on macOS

Instant Client 11.2 supports macOS X Lion, Mountain Lion and Mavericks.

Download the desired Instant Client ZIP files. All installations require the Basic or Basic Light package.

Unzip the packages into a single directory such as "~/instantclient_11_2". For example, to use SQL*Plus:

cd ~

unzip instantclient-basic-macos.x64-11.2.0.4.0.zip

unzip instantclient-sqlplus-macos.x64-11.2.0.4.0.zip

< Create the appropriate libclntsh.dylib link for the version of Instant Client. For example:

cd ~/instantclient_11_2

ln -s libclntsh.dylib.11.1 libclntsh.dylib

Note: OCCI programs will additionally need:

ln -s libocci.dylib.11.1 libocci.dylib

Add links to "~/lib" for required Basic package libraries. For example, to use OCI programs (including SQL*Plus, Python's cx_Oracle, PHP's OCI8, Node.js's node-oracledb, and Ruby's ruby-oci8 driver):

mkdir ~/lib

ln -s ~/instantclient_11_2/{libclntsh.dylib.11.1,libnnz11.dylib,\

libociei.dylib} ~/lib/

To be able to run SQL*Plus, add its libraries to "~/lib", and update PATH. For example:

ln -s ~/instantclient_11_2/{libsqlplus.dylib,libsqlplusic.dylib} ~/lib/

export PATH=~/instantclient_11_2:$PATH

Run SQL*Plus and connect using your database credentials and connection string:

sqlplus hr/welcome@localhost/orclpdb

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值