|
本帖最后由 jiawang 于 2020-12-1 09:33 编辑
有些时候我们在执行shutdown immediate 关闭数据库后,长时间无法关闭数据库:
[oracle@strong admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 - Production on Thu Nov 21 13:55:13 2019
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown immediate;
在另外一个会话中,查看告警日志的输出结果,如下所示:告警日志信息在输出Active processes prevent shutdown operation后,就再无提示信息。
[oracle@strong bdump]$ tail -f 20 alert_orcl.log
Thu Nov 21 13:55:23 2019
Starting background process EMN0
Shutting down instance: further logons disabled
EMN0 started with pid=59, OS id=19244
Thu Nov 21 13:55:24 2019
Errors in file /u01/app/oracle/admin/orcl/udump/orcl_ora_19242.trc:
ORA-04098: trigger 'ADMIN.PIND_ON_SHUT' is invalid and failed re-validation
Thu Nov 21 13:55:24 2019
Shutting down instance (immediate)
License high water mark = 10
All dispatchers and shared servers shutdown
Thu Nov 21 14:00:29 2019
SHUTDOWN: Active processes prevent shutdown operation
解决办法:
1 :首先停应用服务。
2 :其次停止监听服务(listener)
3 :此时可以通过下面命令Kill掉系统中(LOCAL=NO)的ORACLE进程
[oracle@strong ~]$ ps -ef|grep ora|grep -v grep|grep -v ora_|grep LOCAL=NO|awk '{print $2}'
[oracle@strong ~]$ ps -ef|grep ora|grep -v grep|grep -v ora_|grep LOCAL=NO|awk '{print $2}'|xargs kill
此时可以顺利关闭数据库。
|
|