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:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN.

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.

TNS:no listener error in Oracle XE after changing computer name的更多相关文章

  1. TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error:

    今天是2014-06-17.遇到一个很奇怪的问题,可能之前測试改动监听的原因,导致监听启动后自己主动关闭,特此记录一下整个处理过程, 监听配置文件信息例如以下: [oracle@dg1 admin]$ ...

  2. oracle ORA-12514: TNS: no listener 解决方案

    服务端:oracle 11g 客户端: pl/sql 问题描述: 用客户端 pl/sql 连接登录的时候,提示 "ORA-12514: TNS: no listener". 在服务 ...

  3. 修改Oracle XE Listener 占用的1521、8080端口

    修改Oracle XE Listener 占用的1521.8080端口今天在帮开发人员Demon安装oracleXE时,有这么一段提示: [sql]   Destination Folder: D:\ ...

  4. Oracle ORA-12541:TNS:no listener错误解决方法 (转)

    前天装好的Oracle,昨天突然不好用了,从Oracle的错误提示来看,是说TNS:no listener ,估计是某种服务没有启动,打开windows管理工具->服务,一看,有一个Oracle ...

  5. 登录oracle ORA-12541: TNS:no listener报错

    初次安装Oracle是通过VMware在虚拟机上安装的,安装Oracle过程,解锁了两个用户,分别是Scott和HR,也设置了密码,安装完成后输入sqlplus scott/admin123(scot ...

  6. oracle plsql 无法连接 报 ORA-12560: TNS:protocol adapter error

    ORA-12560: TNS:protocol adapter error 添加一个环境变量,名为TNS_ADMIN,值为 tnsnames.ora 文件所在路径.比如我的本机为:D:/instant ...

  7. TNS-12541: TNS:no listener TNS-12560 TNS-00511: No listener

        为了测试需要,系统管理员帮忙将一台ORACLE数据库服务器克隆到虚拟机上,我上去删除了root.oracle.tomcat账号下的crontab定时作业,然后启动了ORACLE数据库实例,删除 ...

  8. 启动监听报错:TNS-12537: TNS:connection closed TNS-12560: TNS:protocol adapter error TNS-00507: Connection closed Linux Error: 29: Illegal seek

    启动监听程序报错: 说明:在rhel5.8上安装完成oracle11g数据库后,使用netca创建完监听,启动监听时报错.还未使用dbca创建实例. [oracle@rusky-oracle11g ~ ...

  9. centos7.3上安装oracle xe 11g

    oracle -11g-xe是数据库是免费版本,支持标准版的大部分功能.oracle XE版本也称快捷版本.是个个人学习,熟悉oracle的简化版. oracle XE做为免费的Oracle数据库版本 ...

随机推荐

  1. [转载]SQL语句练习

    .查询“生物”课程比“物理”课程成绩高的所有学生的学号: 思路: 获取所有有生物课程的人(学号,成绩) - 临时表 获取所有有物理课程的人(学号,成绩) - 临时表 根据[学号]连接两个临时表: 学号 ...

  2. 设置Shader关键字高亮(网上转)

    原文链接:http://www.cnblogs.com/cg_ghost/archive/2011/11/30/2268734.html 经过试验,在VS2012有效. 1. 创建或编辑usertyp ...

  3. 用ansible剧本搭建lnmp

    首先在主服务器上搭建ansible直接用云yum装就可以, yum -y install ansible 如果copy报错一下的语句 "msg": "Aborting, ...

  4. 第十一次作业 - Alpha 事后诸葛亮

    拖鞋旅游队团队事后诸葛亮会议 前言 队名:拖鞋旅游队 组长博客:https://www.cnblogs.com/Sulumer/p/10054510.html 时间:2018-12-1 20:00 地 ...

  5. 创建目录mkdir

    mkdir -p 在创建目录时,我们通常会先检查一下是否存在,如果不存在,就创建,这个时候通常用mkdir -p进行,但是-p是干什么用的呢. mkdir --help一下吧.也就说,如果上级目录不存 ...

  6. mcc,mex,mbuild

    mcc将M文件转换成C/C++文件和相应的MEX包裹文件(需要Matlab编辑器),但在特定条件下可以自动调用mbuild或者mexmex将C/C++文件(入口函数为mexfunction())编译成 ...

  7. I.MX6 CAAM

    /********************************************************************************* * I.MX6 CAAM * 说明 ...

  8. Ipv4和Ipv6的地址字符串长度

    SOURCE   IPv4采用32位地址长度      xxx.xxx.xxx.xxx  15max(string) IPv6采用128位地址长度   估计是  xxx.xxx.xxx.xxx. xx ...

  9. Codeforces 606-C:Sorting Railway Cars(LIS)

    C. Sorting Railway Cars time limit per test 2 seconds memory limit per test 256 megabytes input stan ...

  10. .NET/C# 中你可以在代码中写多个 Main 函数,然后按需要随时切换

    .NET/C# 程序从 Main 函数开始执行,基本上各种书籍资料都是这么写的.不过,我们可以写多个 Main 函数,然后在项目文件中设置应该选择哪一个 Main 函数. 你可能会觉得这样没有什么用, ...