首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >oracle-xe (11g)服务没有挂载数据库

oracle-xe (11g)服务没有挂载数据库
EN

Database Administration用户
提问于 2018-01-21 20:08:25
回答 1查看 1.3K关注 0票数 1

几天前,我对fedora 27进行了系统升级,从那时起,oracle服务没有正确地启动数据库,我的意思是在运行之后:

代码语言:javascript
复制
sudo service oracle-xe start

数据库还没打开。但是,如果我以oracle用户的身份登录,然后执行startdb.sql的内容:

代码语言:javascript
复制
connect / as sysdba
startup
exit

一切照常运作。我认为这个问题是由一些错误的配置引起的,但我不知道该去哪里找。

运行systemctl status oracle-xe只显示数据库不是活动的:

代码语言:javascript
复制
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 21-JAN-2018 16:32:44

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused

从oracle-xe服务的start方法中,日记what报告了以下内容:

代码语言:javascript
复制
Jan 22 20:55:09 localhost.localdomain su[9121]: (to oracle) root on none
Jan 22 20:55:11 localhost.localdomain oracle-xe[9085]: ORACLE instance started.
Jan 22 20:55:11 localhost.localdomain oracle-xe[9085]: Total System Global Area 1068937216 bytes
Jan 22 20:55:11 localhost.localdomain oracle-xe[9085]: Fixed Size                    2233344 bytes
Jan 22 20:55:11 localhost.localdomain oracle-xe[9085]: Variable Size                  616565760 bytes
Jan 22 20:55:11 localhost.localdomain oracle-xe[9085]: Database Buffers          444596224 bytes
Jan 22 20:55:11 localhost.localdomain oracle-xe[9085]: Redo Buffers                    5541888 bytes
Jan 22 20:55:15 localhost.localdomain oracle-xe[9085]: Database mounted.
Jan 22 20:55:18 localhost.localdomain oracle-xe[9085]: Database opened.
Jan 22 20:55:18 localhost.localdomain systemd[1]: Started SYSV: This is a program that is responsible for taking care of.
Jan 22 21:22:56 localhost.localdomain systemd[1]: Stopping SYSV: This is a program that is responsible for taking care of...
Jan 22 21:22:56 localhost.localdomain oracle-xe[10575]: Shutting down Oracle Database 11g Express Edition instance.
Jan 22 21:22:57 localhost.localdomain oracle-xe[10575]: ORA-01034: ORACLE not available
Jan 22 21:22:57 localhost.localdomain oracle-xe[10575]: ORA-27101: shared memory realm does not exist
Jan 22 21:22:57 localhost.localdomain oracle-xe[10575]: Linux-x86_64 Error: 2: No such file or directory
Jan 22 21:22:57 localhost.localdomain oracle-xe[10575]: Stopping Oracle Net Listener.
Jan 22 21:22:57 localhost.localdomain oracle-xe[10575]: LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 22-JAN-2018 21:22:57
Jan 22 21:22:57 localhost.localdomain oracle-xe[10575]: Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Jan 22 21:22:57 localhost.localdomain oracle-xe[10575]: Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
Jan 22 21:22:58 localhost.localdomain oracle-xe[10575]: TNS-12541: TNS:no listener
Jan 22 21:22:58 localhost.localdomain oracle-xe[10575]:  TNS-12560: TNS:protocol adapter error
Jan 22 21:22:58 localhost.localdomain oracle-xe[10575]:   TNS-00511: No listener
Jan 22 21:22:58 localhost.localdomain oracle-xe[10575]:    Linux Error: 111: Connection refused
Jan 22 21:22:58 localhost.localdomain oracle-xe[10575]: Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
Jan 22 21:22:58 localhost.localdomain oracle-xe[10575]: TNS-12541: TNS:no listener
Jan 22 21:22:58 localhost.localdomain oracle-xe[10575]:  TNS-12560: TNS:protocol adapter error
Jan 22 21:22:58 localhost.localdomain oracle-xe[10575]:   TNS-00511: No listener
Jan 22 21:22:58 localhost.localdomain oracle-xe[10575]:    Linux Error: 111: Connection refused
Jan 22 21:22:58 localhost.localdomain systemd[1]: Stopped SYSV: This is a program that is responsible for taking care of.
Jan 22 21:22:58 localhost.localdomain systemd[1]: Starting SYSV: This is a program that is responsible for taking care of...
Jan 22 21:22:58 localhost.localdomain oracle-xe[10620]: Starting Oracle Net Listener.
Jan 22 21:22:58 localhost.localdomain su[10630]: (to oracle) root on none
Jan 22 21:22:58 localhost.localdomain oracle-xe[10620]: LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 22-JAN-2018 21:22:58
Jan 22 21:22:58 localhost.localdomain oracle-xe[10620]: Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Jan 22 21:23:00 localhost.localdomain oracle-xe[10620]: Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait...
Jan 22 21:23:00 localhost.localdomain oracle-xe[10620]: TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Jan 22 21:23:00 localhost.localdomain oracle-xe[10620]: System parameter file is /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Jan 22 21:23:00 localhost.localdomain oracle-xe[10620]: Log messages written to /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Jan 22 21:23:00 localhost.localdomain oracle-xe[10620]: Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
Jan 22 21:23:00 localhost.localdomain oracle-xe[10620]: TNS-12555: TNS:permission denied
Jan 22 21:23:00 localhost.localdomain oracle-xe[10620]:  TNS-12560: TNS:protocol adapter error
Jan 22 21:23:00 localhost.localdomain oracle-xe[10620]:   TNS-00525: Insufficient privilege for operation
Jan 22 21:23:00 localhost.localdomain oracle-xe[10620]:    Linux Error: 1: Operation not permitted
Jan 22 21:23:00 localhost.localdomain oracle-xe[10620]: Listener failed to start. See the error message(s) above...
Jan 22 21:23:00 localhost.localdomain oracle-xe[10620]: Starting Oracle Database 11g Express Edition instance.
Jan 22 21:23:00 localhost.localdomain su[10655]: (to oracle) root on none
Jan 22 21:23:02 localhost.localdomain oracle-xe[10620]: ORACLE instance started.
Jan 22 21:23:02 localhost.localdomain oracle-xe[10620]: Total System Global Area 1068937216 bytes
Jan 22 21:23:02 localhost.localdomain oracle-xe[10620]: Fixed Size                    2233344 bytes
Jan 22 21:23:02 localhost.localdomain oracle-xe[10620]: Variable Size                  616565760 bytes
Jan 22 21:23:02 localhost.localdomain oracle-xe[10620]: Database Buffers          444596224 bytes
Jan 22 21:23:02 localhost.localdomain oracle-xe[10620]: Redo Buffers                    5541888 bytes
Jan 22 21:23:07 localhost.localdomain oracle-xe[10620]: Database mounted.
Jan 22 21:23:08 localhost.localdomain oracle-xe[10620]: Database opened.
Jan 22 21:23:08 localhost.localdomain systemd[1]: Started SYSV: This is a program that is responsible for taking care of.

如果在调用lsnrctl start之后运行sudo service oracle-xe start,数据库将再次激活。

EN

回答 1

Database Administration用户

回答已采纳

发布于 2018-01-28 21:13:35

代码语言:javascript
复制
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 22-JAN-2018 21:22:58
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
Starting /u01/app/oracle/product/11.2.0/xe/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.2.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
TNS-12555: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   Linux Error: 1: Operation not permitted
Listener failed to start. See the error message(s) above...

这通常是由临时位置的一些带有错误权限的剩余套接字文件造成的(例如,有人将侦听器作为root启动)。关闭数据库并删除这些文件如下:

代码语言:javascript
复制
rm -rf /var/tmp/.oracle

然后再试一次。

票数 3
EN
页面原文内容由Database Administration提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://dba.stackexchange.com/questions/195883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档