用Instant Client连接Oracle数据库(不用安装)
1. 下载oracle的客户端程序包(50M)
只需要在 Oracle 下载一个叫 Instant Client 的软件就可以了,这个软件不需要安装,只要解压就可以用了,很方便,就算重装了系统还是可以用的。
下载地址:
http://www.oracle.com/technetwork/indexes/downloads/index.html(下载主页)
http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html(Instant Client)
http://www.oracle.com/technetwork/topics/winsoft-085727.html(32)
http://www.oracle.com/technetwork/topics/winx64soft-089540.html(64)
解压到一个目录中即可,例如D:\instantclient_11_2
2. 配置操作系统环境变量
NLS_LANG=AMERICAN_AMERICA.AL32UTF8
TNS_ADMIN=D:\instantclient_11_2
3. 配置连接Oracle的配置。拷贝tnsnames.ora文件到目录C:\oracleclient。可以从oracle服务器拷贝一个过来。
内容类似:
# tnsnames.ora Network Configuration File: E:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
ORCLProduct =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = prmpatm1.asiapacific.hpqcorp.net)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
ORCL122 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 16.157.133.122)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
4. 安装PLSQL Developer
5. 配置PLSQL Developer(第一次可以不用登录直接进到PLSQL Developer)
Tools --> Preferences--> Connections,
#Oracle Home内容为 D:\instantclient_11_2
OCI library内容为 D:\instantclient_11_2\oci.dll
重新启动PLSQLDeveloper
完毕
GBK的
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
(SIMPLIFIED CHINESE_CHINA.ZHS16GBK)
US7ASCII
NLS_LANG=AMERICAN_AMERICA.US7ASCII
上一篇: Io 异常: End of TNS data channel; nested exception is java.sql.SQLException: Io 数据库javaoralcesql
下一篇: 夏季吃西瓜四大禁忌
推荐阅读
-
linux centOs中安装好数据库,客户端用plsql连接oracle
-
本机不安装Oracle客户端,使用PL/SQL Developer和 Instant Client 工具包连接oracle 11g远程数据库
-
PLSQL+instant client连接oracle数据库
-
利用oracle instant client,不安装客户端使用plsql远程连接数据库 oracleinstantclientsqlwin7
-
oracle10g instant client安装及java通过oci访问数据库
-
用Instant Client连接Oracle数据库(不用安装)
-
linux centOs中安装好数据库,客户端用plsql连接oracle
-
本机不安装Oracle客户端,使用PL/SQL Developer和 Instant Client 工具包连接oracle 11g远程数据库
-
PLSQL+instant client连接oracle数据库