lsnrctl start 命令未找到 数据库连接报错“ORA-12541: TNS: 无监听程序”

Posted 一字千金

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了lsnrctl start 命令未找到 数据库连接报错“ORA-12541: TNS: 无监听程序”相关的知识,希望对你有一定的参考价值。

1. lsnrctl start 命令未找到 或者bash:lsnrctl:command not found.

su - oralce        切换用户的时候,中间要有-,而且-的两边有空格,才能正确切换到oracle用户,否则会出现用户为找到,用户不存在错误;

 

2.数据库连接报错“ORA-12541: TNS: 无监听程序”

是因为数据库的监听线程未启动

(1)secureCRT连接到数据库所在的linux机器,切换到oracle用户模式下

[[email protected] ~]# su - oracle

技术分享
  • 然后用sqlplus登录到数据库,关闭数据库

    [[email protected] bin]$ sqlplus /nolog  //登录sqlplus

    SQL> connect /as sysdba  //连接oracle

    SQL> startup //起动数据库

    SQL> exit  //退出sqlplus ,起动监听

  • (3)

    起动监听

    [[email protected] bin]$ cd $ORACLE_HOME/bin //进入oracle安装目录

    [[email protected] bin]$ lsnrctl start  //起动监听

以上是关于lsnrctl start 命令未找到 数据库连接报错“ORA-12541: TNS: 无监听程序”的主要内容,如果未能解决你的问题,请参考以下文章