instantclient 下载与安装

官方地址: https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html

instantclient-sqlplus-linux.x64-11.2.0.4.0.zip
instantclient-basic-linux.x64-11.2.0.4.0.zip

将以上两个包放到/home/oracle/ 后,并解压

修改环境变量

ORACLE_HOME=/home/oracle/instantclient_11_2
TNS_ADMIN=/home/oracle/instantclient_11_2/network/admin/
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
PATH=$ORACLE_HOME:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME:/lib:/usr/lib; export LD_LIBRARY_PATH

在/home/oracle/instantclient_11_2目录下新建目录 network/admin/ 以及 tnsnames.ora文件。

修改 tns文件

DG1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.27.133.233)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = wnm)
    )
  )

测试sqlplus

[oracle@wnmpreapp41 instantclient_11_2]$ sqlplus wnm/wnm@DG1

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jun 20 10:36:17 2024

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

posted @   Coye  阅读(444)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· DeepSeek在M芯片Mac上本地化部署
· 葡萄城 AI 搜索升级:DeepSeek 加持,客户体验更智能
点击右上角即可分享
微信分享提示