溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶(hù)服務(wù)條款》

連接oracle時(shí)localhost可以ip地址不可以

發(fā)布時(shí)間:2020-08-06 03:27:31 來(lái)源:網(wǎng)絡(luò) 閱讀:4882 作者:87305931 欄目:關(guān)系型數(shù)據(jù)庫(kù)
  1. 在本機(jī)安裝了oracle,使用sqlplus和plsqldev連接的時(shí)候,tnsname.ora中host寫(xiě)的是localhost,此時(shí)連接oracle都沒(méi)有任何問(wèn)題,但是外機(jī)連接本機(jī),和tnsname.ora中host寫(xiě)成ip地址(192.168.1.110)是,報(bào)錯(cuò)ora-12547,沒(méi)有監(jiān)聽(tīng)等

  2. 解決問(wèn)題,oracle自帶管理工具,程序-》oracle-oracle...-》配置和移植工具-》Net Manager中找到本地,LISTENER,添加一個(gè)監(jiān)聽(tīng)服務(wù)地址,然后重啟oracle監(jiān)聽(tīng)服務(wù),然后就可以使用localhost和ip地址對(duì)oracle進(jìn)行訪(fǎng)問(wèn)了

  3. LISTENER.ORA文件

    

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

    (DESCRIPTION =

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

    )

    (DESCRIPTION =

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

    )

  )


TNSNAME.ORA文件

ORCL =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

    )

  )


  

ORCLIP =

  (DESCRIPTION =

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

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl)

    )

  )


向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI