zoukankan      html  css  js  c++  java
  • TNS:no listener error in Oracle XE after changing computer name

    This morning at work when trying to log on to my computer I noticed not my username on login screen but the "admin". Well network IT guys were doing their job setting up their stuff. I changed login to my name and logged in successfully. All was fine until I tried to connect to my local Oracle XE database from my PHP application I was developing. Connection to Oracle on my Windows machine failed with error TNS:no listener.

    What settings needs to be adjusted in Oracle XE after changing computer name on Windows.

    tested to connect to Oracle in CMD using $ sqlplus - all good so database itself was running. So it must be just the listener, which is a separate process that runs on the database server computer, receives incoming client connection requests and manages the traffic of these requests to the database server. I tested listener then $ lsnrctl - tried commands status, start, something was not right ... then I realised the network IT guys must have changed something. Wait, I see, they changed my computer name from VLAD-PC to PC05.

    That's it. Computer name is set as HOST in two Oracle config files: tnsnames.ora and listener.ora located somewhere like: C:oraclexeapporacleproduct11.2.0server etworkADMIN.

    Edit both files (run notepad as administrator) and replace old computer name by new one (in my case VLAD-PC in my case by PC05).

    Restart Oracle XE - from Start menu for Oracle Express Edition Start Stop Database and Start Database.

    Luckily I had this experience before so fixing did not take long time but still took me some time to find out which files needs to be fixed. Finally I do have this blog which helps me next time and hope helps others too.

  • 相关阅读:
    Matlab矩阵填充--Matlab interp2
    Object::connect: No such slot (QT槽丢失问题)
    QT显示框架嵌入Vs控制台工程
    SLAM: 关于Orb_SLAM的使用小综述
    SLAM: Orb_SLAM中的ORB特征
    Ubuntu安装中文语言包
    装X数学:高雅的数学表示
    图像描述:各种维度图像的逻辑描述形式
    Python__configparser模块
    Python__xml模块
  • 原文地址:https://www.cnblogs.com/sos-blue/p/3399120.html
Copyright © 2011-2022 走看看