oracle instantclient配置

虛擬機裏的Linux安裝了Oracle,因爲在Windows物理機要用到PL/SQL Developer鏈接到虛擬機裏的Oracle,html

可是不想在物理機裏在從新安裝一下Oracle了(太大了,沒地了=。=)。因而用到了Oracle Instant Client。sql

好了廢話很少說了。步驟以下:windows

一、先在Linux裏配置好監聽。listener.ora 文件內容以下oracle

# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.oraapp

# Generated by Oracle configuration tools.工具

SID_LIST_LISTENER =.net

(SID_LIST =htm

(SID_DESC =blog

(SID_NAME = PLSExtProc)ip

(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)

(PROGRAM = extproc)

)

(SID_DESC =

(GLOBAL_DBNAME = wiseman)

(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)

(SID_NAME = wiseman)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.99)(PORT = 1521))

)

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

)

)

 

注:SID_name的大小寫必須和Linux裏的SID同樣。個人是小寫

二、而後是Windows端的配置了,先把http://www.oracle.com/technetwork/topics/winsoft-085727.html下的

instantclient-basic-nt-11.2.0.3.0.zip下載下來(個人是32位系統),而後解壓到C:\Oracle\instantclient_11_2下,而後把tnsnames.ora複製到C:\Oracle\instantclient_11_2\network\admin下。內容以下:

GGDB =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.0.99)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = WISEMAN)

)

)

三、最後設置PL/SQL Developer,工具-->首選項下改爲以下圖內容便可

 

如今重啓一下PL/SQL Developer,再次登錄就好了。

 

補充:

Instant Client 不自帶SQL*Plus因此能夠在剛纔的頁面下載它,instantclient-sqlplus-nt-11.2.0.3.0.zip。下載完後,

在配置一下windows端的系統變量。

NLS_lANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK

TNS_ADMIN=C:\Oracle\instantclient_11_2

Path=C:\Oracle\instantclient_11_2

 

 

如今就能夠用 sqlplus system/oracle@GGDB 進行鏈接了。

 

原文連接:http://blog.csdn.net/wise_man/article/details/7781991

相關文章
相關標籤/搜索