安装下载mac对应的oracle instantclient.
解压出来就行.
注意sqlplus有单独一个包.
sqlplus xmp/xmp@192.168.18.143:1521/xmp
建立软链接
ln -s instantclient /usr/lib
创建一个 tnsname.ora
$ export TNS_ADMIN=$PWD/instantclient_11_2
$ echo "TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <db_server>)(PORT = <listener port>))
)
(CONNECT_DATA =
(SERVICE_NAME = <full_db_service_name>)
)
)
" > $TNS_ADMIN/tnsnames.ora
我在mac用的:
export NLS_LANG="SIMPLIFIED CHINESE_CHINA".AL32UTF8
SELECT * FROM v$nls_parameters;
select * from nls_database_parameters;
SELECT * FROM v$nls_valid_values;
select userenv(‘language’) from dual;
export NLS_LANG=american_america.AL32UTF8
export NLS_LANG="Simplified Chinese_china".ZHS16GBK
参考:
http://stackoverflow.com/questions/19152403/oracle-sqlplus-client-on-mac
http://database.51cto.com/art/201107/279361.html
http://database.51cto.com/art/201107/279361.htm
下载:
http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
安装:
https://docs.oracle.com/cd/E11882_01/install.112/e38228/inst_task.htm#BABHEBIG