PLSQL 連線資料庫配置
1、下載Instant Client。下載完成後解壓該檔案。如:我將其解壓在E:\oracleClient\instantclient_11_2該路徑下。進入到instantclient_11_2下建立目錄NETWORK,然後再NETWORK下建立目錄ADMIN。在ADMIN目錄下建立tnsnames.ora檔案,在該tnsnames.ora檔案中新增如下內容:
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
128 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.48.128)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.wtLinux)
)
)
2:環境變數的配置
新增下面兩個變數 TNS_ADMIN tnsnames.ora所在路徑 如 E:\oracleClient\instantclient_11_2\NETWORK\ADMINNLS_LANG SIMPLIFIED CHINESE_CHINA.ZHS16GBK
3:下載並安裝PLSQL Developer
安裝完成後進入PLSQL Developer,選擇tools->preferences->connection
Oracle Home
E:\oracleClient\instantclient_11_2 或 E:\app\lijuan\product\11.2.0\dbhome_1(本機oracle安裝主目錄
OCI library
E:\oracleClient\instantclient_11_2\oci.dll
修改完畢後儲存並重啟PLSQL Developer就可以使用該工具了。