sqlplus中prelim / as sysdba宕机且无法进入怎么办

网友投稿 208 2024-01-02

sqlplus中prelim / as sysdba宕机且无法进入怎么办

这篇文章主要介绍sqlplus中prelim / as sysdba宕机且无法进入怎么办,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!

遇到一个系统,数据库无法正常运行,查看数据库的进程发现数据库已宕,结果如下:

[oracle@xiaowu ~]$ ps -ef | grep ora_

oracle 6218 6161 0 09:39 pts/2 00:00:00 grep ora_

用超级管理员用户登录数据库时,系统报 ORA-00020 的错误,很奇怪,数据库未启动,还报进程数超上限的错误。

[oracle@xiaowu ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 23 10:48:12 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:

ORA-00020:maximum number of processes (500) exceeded

Enter user-name:

解决 ORA-00020 错误,加大processes的参数值即可,但是需要正常启动数据库并成功登陆后才能修改,但是现在数据库都无法正常启动,一时想不到解决方法,最后求助资深DBA解决,方法如下:

首先通过加参数 “-prelim” 成功登陆数据库

[oracle@xiaowu ~]$ sqlplus -prelim / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 23 11:10:09 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> 

此时就可以正常关闭和开启数据库,安装如下命令操作解决问题:

shutdown immediate;

startup;

show parameter processes;

alter system set processes=1000 scope=spfile;

startup force;

show parameter processes;

exit;

************************************************************************************************

未完全关闭数据库导致ORA-01012: not logged的解决

首先使用SHUTDOWN NORMAL方式关闭数据库,在数据库未关闭时CTRL+Z停止执行,退出用SQLPLUS重登陆,出现报错:ORA-01012: not logged on

实验如下:

首先执行

SYS@bys1>shutdown

ORA-01013: user requested cancel of current operation

[oracle@bys001 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sat Sep 7 09:05:08 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected.

ERROR:

ORA-01012: not logged on

Process ID: 0

Session ID: 0 Serial number: 0

SYS@bys1>startup

ORA-01012: not logged on

SYS@bys1>conn / as sysdba

Connected to an idle instance.

ERROR:

ORA-01012: not logged on

Process ID: 0

Session ID: 0 Serial number: 0

SYS@bys1>conn bys/bys

ERROR:

ORA-01090: shutdown in progress - connection is not permitted

Process ID: 0

Session ID: 0 Serial number: 0

Warning: You are no longer connected to ORACLE.

解决方法:

找到进程,kill掉就可以了。

[oracle@bys001 ~]$ ps -ef |grep ora_dbw0_

oracle    6519     1  0 Sep06 ?        00:00:15 ora_dbw0_bys1

oracle   20947 20924  0 09:08 pts/0    00:00:00 grep ora_dbw0_

[oracle@bys001 ~]$ kill -9 6519

[oracle@bys001 ~]$ ps -ef |grep ora_dbw0_

oracle   20949 20924  0 09:08 pts/0    00:00:00 grep ora_dbw0_

[oracle@bys001 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sat Sep 7 09:08:22 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SYS@bys1>startup

ORACLE instance started.

Total System Global Area  631914496 bytes

Fixed Size                  1338364 bytes

Variable Size             264242180 bytes

Database Buffers          360710144 bytes

Redo Buffers                5623808 bytes

Database mounted.

Database opened.

SYS@bys1>

以上是“sqlplus中prelim / as sysdba宕机且无法进入怎么办”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注行业资讯频道!

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:jquery是前端框架吗?
下一篇:js轮播图无缝滚动原理?
相关文章

 发表评论

暂时没有评论,来抢沙发吧~