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.

  • 相关阅读:
    Linux 分卷压缩
    用 virtualenv 创建隔离的 Python 运行环境
    Ubuntu 16.04 安装 Python3.6
    Python 的全局变量
    Git 使用总结
    开源的许可证GPL、LGPL、BSD、Apache 2.0
    Python Unofficial Package Site
    apt-get update 更新 ubuntu时出现Hash sum mismatch的原因及解决方法
    Keep It Simple & Stupid
    Python IDLE 增加清屏功能
  • 原文地址:https://www.cnblogs.com/sos-blue/p/3399120.html
Copyright © 2011-2022 走看看