在windows机器上不想安装oracle或者oracle的客户端,我们怎么使用PLSQL Developer工具呢?答案如下:
环境 windows-xp 32位
1:在oracle官网上下载instantclient-basic-nt-11.2.0.3.0.zip该文件,下载地址为:客户端。下载完成后解压该文件。如:我将其解压在C:\Program Files (x86)\instantclient_11_2该路径下。进入到instantclient_11_2下创建目录NETWORK,然后再NETWORK下建立目录ADMIN。在ADMIN目录下建立tnsnames.ora文件,在该tnsnames.ora文件中添加如下内容:
ty4a_dev_173 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 远程数据库IP地址)(PORT = 远程数据库端口号))
)
(CONNECT_DATA =
(SERVICE_NAME = 远程数据库服务名)
)
)
ty4a_dev =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 远程数据库IP地址)(PORT = 远程数据库端口号))
)
(CONNECT_DATA =
(SERVICE_NAME = 远程数据库服务名)
)
)
ty4a_online =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 远程数据库IP地址)(PORT = 远程数据库端口号))
(ADDRESS = (PROTOCOL = TCP)(HOST = 远程数据库IP地址)(PORT = 远程数据库端口号))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = 远程数据库服务名)
)
)
ty4a_yingji =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 远程数据库IP地址)(PORT = 远程数据库端口号))
)
(CONNECT_DATA =
(SERVICE_NAME = 远程数据库服务名)
)
)
a.打开环境变量设置添加TNS_ADMIN,值为tnsnames.ora所在路径,即:C:\Program Files (x86)\instantclient_11_2。如本示例为C:\Program Files (x86)\instantclient_11_2\tnsnames.ora
b.设置ORACLE的语言,添加环境变量NLS_LANG,值为AMERICAN_AMERICA.AL32UTF8 如果出现乱码可用SIMPLIFIE CHINESE_CHINA.ZHS16GBK
c.设置环境变量ORACLE_HOME,值为C:\Program Files (x86)\instantclient_11_2
3:下载并安装PLSQL Developer,输入用户名、密码登录,选择要连接的数据库
登录成功,ok