1、直接修改\oracle\product\10.2.0\client_2\NETWORK\ADMIN\tnsnames的文件,直接添加
成都做網(wǎng)站、網(wǎng)站設計介紹好的網(wǎng)站是理念、設計和技術的結(jié)合。創(chuàng)新互聯(lián)建站擁有的網(wǎng)站設計理念、多方位的設計風格、經(jīng)驗豐富的設計團隊。提供PC端+手機端網(wǎng)站建設,用營銷思維進行網(wǎng)站設計、采用先進技術開源代碼、注重用戶體驗與SEO基礎,將技術與創(chuàng)意整合到網(wǎng)站之中,以契合客戶的方式做到創(chuàng)意性的視覺化效果。
TOPPROD = (DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.15)(PORT = 1521)) )
(CONNECT_DATA =
(SERVICE_NAME = topprod) ) )
2、一種圖形界面,在安裝的時候,將oracle所在服務器或電腦的IP加入
你好,
oracle數(shù)據(jù)庫所在的機器更改IP地址后,發(fā)現(xiàn)無法連接,
解決這個問題,需要修改一下對應的文件:
F:\app\zhaohe\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
F:\app\zhaohe\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
把其中對應的IP地址進行修改后再重新啟動oracle就可以解決問題了;
注:重啟實例服務、OracleOraDb11g_home1TNSListener后,稍等1分鐘后即可。
listener.ora
# listener.ora Network Configuration File: F:\app\zhaohe\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = F:\app\zhaohe\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:F:\app\zhaohe\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.5)(PORT = 1521))
)
)
ADR_BASE_LISTENER = F:\app\zhaohe
tnsnames.ora
# tnsnames.ora Network Configuration File: F:\app\zhaohe\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.5)(PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.5)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
注意:HOST位置要用機器名或機器的網(wǎng)絡IP(如192.168.1.5)
不管你本地是什么系統(tǒng),要使用主機名連接oracle,都需要在hosts文件里面定義IP解析的條目,類似下面的內(nèi)容。
dex-pc 10.77.89.19