instantclient_10_2客户端配置

1.下载Oracle Client Package .

http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html下载

Instant Client Package – Basic( 标注:All files required to run OCI, OCCI, and JDBC-OCI applications)这里下载的是Version 10.2.0.4

2.本地保存Oracle Client Package:

创建文件夹,比如oracle_client,将下载的文件加压缩到此文件夹里.(笔者目录: D:\oracle_client\instantclient_10_2)

3.在当前目录下,手动配置sqlnet.oratnsnames.ora

比如这里是:

sqlnet.ora文件内容:

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

tnsnames.ora文件内容(斜体表示需要替换的内容):

jcms=

(DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.230)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = viewline)

    )

)

4.配置环境变量

变量名: TNS_ADMIN

变量值: D:\oracle_client\instantclient_10_2

否则出现:ORA-12154: TNS:could not resolve the connect identifier specified错误

如果之前安装了Oracle 又卸载,会遗留NLS_LANG=NA的键值.输入RegEdit打开注册表HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE.在右面找到NLS_LANG=NA并删除掉

否则会报ORA-12705: Cannot access NLS data files or invalid 错误.

5.安装pl/sql软件(过程略)

6.配置pl/sqlOracle连接参数:

选择pl/sql的工具/首选项(too/ preference/)里的连接,在右面设置Oracle主目录名(即安装目录)OCI.

Oracle主目录名: D:\oracle_client\instantclient_10_2

OCI: D:\oracle_client\instantclient_10_2\oci.dll

7.登陆pl/sql测试成功
posted @ 2009-12-04 13:15  天纯蓝  阅读(2738)  评论(0编辑  收藏  举报