PL/SQL Developer是一款Oracle开发调试管理工具,当前基于官方最新的PL/SQL Developer 14版本安装并配置Oracle数据库连接。
本文基于Windows10_1909系统环境进行验证,其他系统环境不保证一定可用,请自行测试。
PLSQL Developer 14版本默认自带中文语言了,无需额外安装汉化包。
不配置tns,直接连接plsql方法见文末!!!
首先下载PLSQL Developer 14 (64 bit)和instantclient,instantclient截至本文发文前最新版本是19.11.0.0.0。
注意:instantclient版本不一定要用最新的,部分情况下使用最新版本会出现连接报错
PLSQL Developer 14下载:
官方下载地址:https://www.allroundautomations.com/files/trial/plsqldev1405x64.msi
本地下载地址:https://down.whsir.com/downloads/plsqldev1405x64.msi
instantclient官方下载地址:
https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html
https://www.oracle.com/cn/database/technology/instant-client.html
注意这里官方提供两个版本Basic Package和Basic Light Package,你可以理解成完整版和最小化版本,因为PLSQL主要需要oci.dll,所以此处下载最小化的包就行,即instantclient-basiclite-windows.x64-19.9.0.0.0dbru.zip
官方下载地址:https://download.oracle.com/otn_software/nt/instantclient/19900/instantclient-basiclite-windows.x64-19.9.0.0.0dbru.zip
本地下载地址:https://down.whsir.com/downloads/instantclient-basiclite-nt-19.9.0.0.0dbru.zip
附instantclient其他版本下载地址,使用配置方法与19版本一致:
https://down.whsir.com/downloads/instantclient-basiclite-win64-10.2.0.5.zip
https://down.whsir.com/downloads/instantclient-basiclite-win-x86-64-11.1.0.7.0.zip
建议使用此版本: https://down.whsir.com/downloads/instantclient-basic-windows.x64-11.2.0.4.0.zip
https://down.whsir.com/downloads/instantclient-basiclite-windows.x64-12.1.0.2.0.zip
https://down.whsir.com/downloads/instantclient-basiclite-windows.x64-12.2.0.1.0.zip
https://down.whsir.com/downloads/instantclient-basiclite-windows.x64-18.5.0.0.0dbru.zip
https://down.whsir.com/downloads/instantclient-basiclite-windows.x64-19.11.0.0.0dbru.zip
PLSQL Developer 14安装
直接运行plsqldev1405x64.msi安装程序即可,和正常软件安装方式没有什么区别,无脑下一步,如有需要,修改个安装路径即可。
运行PLSQL Developer 14 (64 bit)修改中文
产品注册
产品编号:ke4tv8t5jtxz493kl8s2nn3t6xgngcmgf3
序列号:264452
密码:xs374ca
关闭在线检查更新
配置instantclient用于Oracle服务器连接
解压instantclient-basiclite-nt-19.9.0.0.0dbru.zip至C:\Program Files\PLSQL Developer 14目录下,该目录是我PL/SQL安装目录
然后在C:\Program Files\PLSQL Developer 14\instantclient_19_11目录下新建network目录,在network目录下再新建admin目录,在admin目录下新建文件tnsnames.ora
我这里通过nodepad++打开tnsnames.ora文件,写入以下内容
ORACLE_TEST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) ORACLE_TEST2 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
|----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ORACLE_TEST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) ORACLE_TEST2 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) |
其中ORACLE_TEST表示连接远程服务器的名称,可以理解成它是个注释,可随意起名(如果配置中文名称会显示乱码)
HOST = 127.0.0.1其中127.0.0.1表示远程数据库的连接地址,PORT = 1521远程数据库的端口,默认1521
SERVICE_NAME = orcl表示连接远程数据库的实例名,默认是orcl
注:网上很多文章写着要配置一个系统环境变量,经过吴昊测试,无需配置系统环境变量!
运行PLSQL Developer 14 (64 bit)配置Oracle主目录及OCI库(如果instantclient是其他版本,只需要更改instantclient路径即可)
C:\Program Files\PLSQL Developer 14\instantclient_19_11\network\admin
C:\Program Files\PLSQL Developer 14\instantclient_19_11\oci.dll
配置完成后,重新运行PLSQL Developer 14就可以看到刚刚添加的数据库了,
如果不修改配置文件直接连接想要连接的数据库是否可以?
当然可以,只需要在数据库这里填写要连接的IP地址+orcl,注意我这里用的是默认的orcl,如果你的不是,请更改,此时可以直接点击登录了。