Oracle資料庫無法使用localhost和127.0.0.1訪問,oraclelocalhost

來源:互聯網
上載者:User

Oracle資料庫無法使用localhost和127.0.0.1訪問,oraclelocalhost

最近學習Oracle資料庫,在虛擬機器中的Windows XP SP3系統中安裝了Oracle 10g(版本:Oracle_10g_10.2.0.1_win32)。

安裝完成後,使用PL/SQL Developer訪問Oracle資料庫,發現只能使用IP地址訪問(192.168.135.90),而無法使用localhost和127.0.0.1訪問。

經過研究,發現這是LISTENER配置問題導致的。

解決辦法:配置LISTENER時,使用主機名稱,而不是IP地址或localhost。

解決後的LISTENER配置如所示:

開啟Oracle的Net Manager工具,配置LISTENER:


LISTENER配置中的主機填寫原生主機名稱:我這裡是zht-ylmf


主機名稱可以再cmd命令列中通過>hostname 命令擷取到:



配置好LISTENER之後,在配置命名服務,命名服務中的主機名稱填寫:localhost、127.0.0.1 或者 192.168.135.90 ,再用PL/SQL Developer就都能訪問資料庫了。





相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.