Oracle 11 g 侦听器无法启动

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9188704/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 00:35:58  来源:igfitidea点击:

Oracle 11 g listener wont start

oracleoracle11g

提问by

A few hours earlier I posted this question herethat I can't connect my java application to Oracle database , no solutiuon so far.

几个小时前,我在这里发布了这个问题,我无法将我的 java 应用程序连接到 Oracle 数据库,到目前为止还没有解决方案。

But after some research I found that the listener is not started , I mean it gives me an error when I try to start the listener through LSNCTRL that says :

但是经过一些研究,我发现侦听器没有启动,我的意思是当我尝试通过 LSNCTRL 启动侦听器时,它给了我一个错误:

 Message 1070 not found; No message file for product=NETWORK, facility=TNSTNS-125
 60: Message 12560 not found; No message file for product=NETWORK, facility=TNS
 TNS-00530: Message 530 not found; No message file for product=NETWORK, facility
 =TNS

And when I try to see the status of the Listener it says :

当我尝试查看 Listener 的状态时,它说:

Message 1053 not found; No message file for product=NETWORK, facility=TNSTNS-125
41: Message 12541 not found; No message file for product=NETWORK, facility=TNS
TNS-12560: Message 12560 not found; No message file for product=NETWORK, facili
ty=TNS
TNS-00511: Message 511 not found; No message file for product=NETWORK, facilit
y=TNS
 32-bit Windows Error: 61: Unknown error

So can someone tell me whats wrong ?

那么有人可以告诉我出了什么问题吗?

回答by Hakuna Matata

Most of these Message not found error due to not setting the ORACLE_HOME properly. Set the ORACLE_HOME properly and see if you still getting this error.

由于未正确设置 ORACLE_HOME,大多数这些 Message not found 错误。正确设置 ORACLE_HOME 并查看您是否仍然收到此错误。

回答by malajisi

According to @Hankuna Matata's guide. If you run oracle on CentOS or other linux Try to set ORACLE_HOME in user oracle .bash_profile. My .bash_profile located at /home/oracle. Append following lines:

根据@Hankuna Matata 的指南。如果您在 CentOS 或其他 linux 上运行 oracle 尝试在用户 oracle .bash_profile 中设置 ORACLE_HOME。我的 .bash_profile 位于 /home/oracle。附加以下几行:

export ORACLE_BASE=/home/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=orcl 

Then run the command with user oracle in terminal

然后在终端中使用 oracle 用户运行命令

$ source .bash_profile
$ lsnrctl start

If you see lines end with "The command completed successfully" instead error message, you got it!

如果您看到以“命令成功完成”结尾的行而不是错误消息,那么您明白了!