在windows機器上不想安裝oracle或者oracle的客戶端,使用PLSQL Developer工具數據庫
1:在oracle官網上下載instantclient-basic-nt-xxxx.zip該文件,下載完成後解壓該文件。如:我將其解壓在E:\oracleClient\instantclient_xxx該路徑下。進入到instantclient_xx下建立目錄NETWORK,而後再NETWORK下創建目錄ADMIN。在ADMIN目錄下創建tnsnames.ora文件,在該tnsnames.ora文件中添加以下內容:windows
ORACLR_CONNECTION_DATA = oracle
(DESCRIPTION = 工具
(ADDRESS_LIST = spa
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) orm
) ip
(CONNECT_DATA = ci
(SID = CLRExtProc) it
(PRESENTATION = RO) io
)
)
TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.110)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
192.168.2.110--爲數據庫所在機器ip
2:環境變量的配置
打開環境變量設置添加TNS_ADMIN,值爲tnsnames.ora所在路徑。如本機爲E:\oracleClient\instantclient_xx\NETWORK\ADMIN\tnsnames.ora
設置ORACLE的語言,添加環境變量NLS_LANG,值爲AMERICAN_AMERICA.AL32UTF8 若是出現亂碼可用SIMPLIFIED CHINESE_CHINA.ZHS16GBK
3:下載並安裝PLSQL Developer
安裝完成後進入PLSQL Developer,選擇tools->preferences->connection
Oracle Home
E:\oracleClient\instantclient_xx
OCI library
E:\oracleClient\instantclient_xx\oci.dll
修改完畢後保存並重啓PLSQL Developer就可使用該工具了。