PL/SQL Developer 或Toad 不安装Oracle 客户端连接数据库

时间:2021-07-18 00:14:07

PL/SQL Developer 或Toad 不安装Oracle 客户端连接数据库
使用Oracle InstantClient连接oracle数据库

1 下载相应的程序, 我下的是10204的 instantclient-basic-win32-10.2.0.4.zip (34,742,358 bytes)

或者instantclient-basic-win32-10.2.0.3-20061115.zip

http://www.oracle.com/technology/global/cn/software/tech/oci/instantclient/htdocs/winsoft.html?_template=/ocom/print

 

2 将Oracle Instatnt Client解压至D:/instantclient_10_2

3 "控制面板"-"系统"-"高级"-"环境变量"-"系统变量"添加

NLS_LANG = AMERICAN_AMERICA.ZHS16GBK(或SIMPLIFIED CHINESE_CHINA.ZHS16GBK)
TNS_ADMIN = D:/instantclient_10_2
LD_LIBRARY_PATH = D:/instantclient_10_2
SQLPATH = D:/instantclient_10_2

Path变量结尾添加D:/instantclient_10_2(注:不同的路径用半角分号;间隔)
4 在D:/instantclient_10_2中用添加如下内容的文件,文件名为tnsnames.ora

5 可以下载单独的Oracle SDK 和Oracle SQL PLUS到安装目录中,解压即可运行

附ORA文件内容与格式

tnsnames.ora
#D:/instantclient_10_2/tnsname.ora

mydb1 =
(DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.47)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = dedicated)
      (SERVICE_NAME = mydb1)
    )
)

说明:
 

http://www.cnblogs.com/dashan9zj/archive/2009/07/30/1534707.html