当前位置:   article > 正文

Oracle服务器断电后报错,ORA-01034: ORACLE not available ORA-27101_oracle报错ora-01034和ora-27101,引起oracle not available

oracle报错ora-01034和ora-27101,引起oracle not available linux

一、说明

出现ORA-01034和ORA-27101的原因是多方面的:主要是oracle当前的服务不可用,shared memory realm does not exist,是因为oracle没有启动或没有正常启动,共享内存并没有分配给当前实例.所以,通过设置实例名,再用操作系统身份验证的方式,启动数据库。这样数据库就正常启动了,就不会报ORA-01034和ORA-27101两个启动异常了。

还有就是可能是登录数据库后,不正常的退出,比如直接关掉窗口,而这时数据库里有未完成的动作,再次登录时就会提示“insufficient privileges”的报错,SQL>shutdown immediate;   SQL>startup;就恢复正常了。

最后可能你虚拟机的共享内存问题,看下数据库的配置文件是否对应了512M内存?还是你设置的大了,本身给的不足?

 

二、解决方法

1、启动监听

先看oracle的监听和oracle的服务是否都启动了。

启动oracle监听:cmd命令行窗口下,输入lsnrctl start,回车即启动监听。

  1. [root@scorl ~]# lsnrctl start
  2. LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 26-FEB-2020 12:22:48
  3. Copyright (c) 1991, 2011, Oracle. All rights reserved.
  4. Starting /Database/oraapp/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
  5. TNSLSNR for Linux: Version 11.2.0.3.0 - Production
  6. System parameter file is /Database/oraapp/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
  7. Log messages written to /Database/oraapp/oracle/diag/tnslsnr/scorl/listener/alert/log.xml
  8. Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  9. Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=scorl.dyedu.cn)(PORT=1521)))
  10. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
  11. STATUS of the LISTENER
  12. ------------------------
  13. Alias LISTENER
  14. Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production
  15. Start Date 26-FEB-2020 12:22:48
  16. Uptime 0 days 0 hr. 0 min. 30 sec
  17. Trace Level off
  18. Security ON: Local OS Authentication
  19. SNMP OFF
  20. Listener Parameter File /Database/oraapp/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
  21. Listener Log File /Database/oraapp/oracle/diag/tnslsnr/scorl/listener/alert/log.xml
  22. Listening Endpoints Summary...
  23. (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  24. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=scorl.dyedu.cn)(PORT=1521)))
  25. Services Summary...
  26. Service "scorl.dyedu.cn" has 1 instance(s).
  27. Instance "scorl", status UNKNOWN, has 1 handler(s) for this service...
  28. The command completed successfully

2、设置sid(正常没必要设置)

查看oracle的sid叫什么,比如创建数据库的时候,实例名叫“orcl”,那么先手工设置一下oralce的sid,cmd命令窗口中,set ORACLE_SID=orcl

3、重启Oracle

  1. [root@scoreorl ~]# su - oracle
  2. [oracle@scoreorl ~]$ sqlplus /nolog
  3. SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 25 21:43:18 2017
  4. Copyright (c) 1982, 2011, Oracle. All rights reserved.
  5. SQL> connect / as sysdba
  6. Connected.
  7. SQL>
  8. SQL> startup
  9. ORACLE instance started.
  10. Total System Global Area 9620525056 bytes
  11. Fixed Size 2236488 bytes
  12. Variable Size 4831842232 bytes
  13. Database Buffers 4764729344 bytes
  14. Redo Buffers 21716992 bytes
  15. Database mounted.
  16. Database opened.

再输入startup,回车.这步是启动oracle服务。如果startup启动被告知已经启动了,可以先输入shutdown immediate;等shutdown结束之后,再输入startup。

过几秒钟等命令运行完成,就能连接了。这个时候,可以输入"select * from user_tables;"测试一下,看是否有查询结果。

 

参考:https://jingyan.baidu.com/article/5552ef47c73eef518ffbc908.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/不正经/article/detail/500131
推荐阅读
相关标签
  

闽ICP备14008679号