What To Do and Not To Do When 'shutdown immediate' Hangs [ID 375935.1]
|
|
|
Modified 22-JUL-2010Type HOWTOStatus PUBLISHED
|
|
In this Document
Goal
Solution
References
Applies to:
Oracle Server - Enterprise Edition - Version: 8.1.7.0 to 11.1.0.7 - Release: 8.1.7 to 11.1
Information in this document applies to any platform.
***Checked for relevance on 22-Jul-2010***
What to do when shutdown immediate appears to hang:
Sometimes, the message 'Waiting for smon to disable tx recovery' is posted in the alert log.
This note only addresses situations when the apparent hang occurs when the database is going from OPEN to MOUNT, which is actually the most common situation.
If the apparent hang occurs at a different step, then this note does not apply.
The big problem in these situations is that it is noticed only after the shutdown immediate has been issued.
This kind of situation is mostly caused by 2 things:
1. a large query running at the shutdown moment.
2. a large transaction running at the shutdown moment.
Both have to complete in order for the database to be brought down when shutdown immediate is issued.
Actually, the files cannot be closed consistently because of one of the 2 possibilities above and, as such, the transition from OPEN to MOUNT is postponed until the files are closed, which means that either the large query completes or the large transaction is rolled back. This is not a hang, it is the expected behavior.
So, before issuing the shutdown immediate, it would be recommended to check the following views, especially when the database needs to be brought down for a very short period of time:
1. for large queries:
select count(*) from v$session_longops where time_remaining>0;
2. for large transactions:
select sum(used_ublk) from v$transaction;
A result greater than 0 for the first query and a large value returned for the second one would mean a relatively long time to wait until the shutdown immediate completes.
For the second situation, please also check step 9 in Note 117316.1 to "guestimate" the time to rollback the transactions.
1. For the large queries situation, when the shutdown immediate is hanging, you can just bring down the database using: shutdown abort, as the database could be easily brought to a consistent state by:
startup restrict followed by shutdown immediate.
One should take the backup and/or do whatever else need to be done after the shutdown immediate.
2. For the second situation, the workaround cannot be applied, especially when it's needed to take a cold backup. The database must be closed in a consistent state in order to do this and the consistent state cannot be achieved until all the transactions have completed one way or another (commit/rollback).
As such, it's up to the local personnel to decide what to do, depending on the local needs.
It is very important to realize that: BY SHUTTING DOWN A DATABASE YOU DO NOT SOLVE A PERFORMANCE PROBLEM CAUSED BY A LARGE TRANSACTION. You are only making things worse.
There are situations when the database is brought down even when a large transaction/large recovery is taking place. Then it's brought up again and a new shutodwn is tried. Again, the shutdown immediate is hanging, for a very simple reason - the large recovery is still going on.
At this moment, the v$transaction view is not displaying anything.
However, it is still possible to check the recovery operation by checking the:
select * from v$fast_start_transactions;
and/or
select * from v$fast_start_servers;
views. They are the ones that display the recovery status.
As such, when a large transaction is taking place, do not try successive shutdown aborts, startups and shutdown immediate. The hang will reoccur. The database must be consistent when the database is dismounted - performing successive shutdowns/startups is not helping at all, it's only making the recovery even more lengthy.
You should prevent these situations by notifying the users a shutdown will be done and no large operations should be started.
If a large operation has already started at the moment when you want to shutdown immedate, assess what would be faster - rollback the current situation or allow it to complete.
NOTE:117316.1 - ORA-0054: When Dropping or Truncating Table, When Creating or Rebuilding Index
------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
DBA1 群:62697716(满); DBA2 群:62697977(满)
DBA3 群:62697850 DBA 超级群:63306533;
聊天 群:40132017
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请
分享到:
相关推荐
C#shutdown.rarC#shutdown.rarC#shutdown.rarC#shutdown.rar
PC.Auto.Shutdown.v3.8 PC.Auto.Shutdown.v3.8
此bat文件解决小米miui链接电脑进入fastboot模式时出现press any key to shutdown的问题,以管理员身份运行即可
ShutDown.rar 多条件设置定时关机,可设置cpu 使用情况定时关机 挂机者必备工具
1 Overview ..............................................................................................................................................41 Java EE ApplicationModel ......................
Simply put, this book is designed to empower and excite the programming community to go out and do cool things with the TPM. The approach is to ramp the reader up quickly and keep their interest.A ...
易语言模块ShutDown.rar 易语言模块ShutDown.rar 易语言模块ShutDown.rar 易语言模块ShutDown.rar 易语言模块ShutDown.rar 易语言模块ShutDown.rar
windowsxp的关机程序 shutdown.exe
是windows xp自带的系统级文件,微软出品。 用于windows xp的自定义任务或者命令行控制关机、强制关机功能必须...解压后将shutdown.exe文件存放在C:\windows\system32下。 但是非专业版的windows xp有可能缺失此文件。
系统工具.Wise.Auto.Shutdown.Portable.1.65.自动关机简体中文便携版
易语言模块ShutDown1.rar 易语言模块ShutDown1.rar 易语言模块ShutDown1.rar 易语言模块ShutDown1.rar 易语言模块ShutDown1.rar 易语言模块ShutDown1.rar
shutdown.exe
1.1 Origins and evolution................................................................................................1 1.2 Main characteristics, context and reasons for developing a new language....
1_shutdown.exe
1)....Added "ECC32TradeSpeedForMemory" option - defaults to 0/False, could be changed to 1 via Custom/Manual tab. This option will switch from fast-methods to slower methods, but which take less ...
Chapter 1—Origins, Context and Popularity of Go...............................................................1 1.1 Origins and evolution................................................................
What is not a DR Technology? .............................................................................. 13 What is VMware SRM? .......................................................................
进入fastboot模式后,一连接刷机助手就变成press any key to shutdown 右键 管理员运行即可
Disk Features: · Supports ramdisk, hybrid-disk, and file-disk. · Supports SCSI disk, Direct-IO disk. ...· Fix bug: Program hangs while saving the image file, if last saving was not successful.
NULL 博文链接:https://songjianyong.iteye.com/blog/2056990