到下载instantclient-basic-macos和instantclient-sqlplus-macos。
新建目录:
新建tnsnames.ora
到/opt/oracle/tns
# tnsnames.ora Network Configuration File:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = www.xxx.yyy.zzz)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = orcl)
)
)
将下载的zip里的内容统统放到/opt/oracle/oracle-instant-client
目录下
重新开启终端,运行sqlplus命令试试。