shutdown之前的好习惯

shutdown之前的好习惯
===========================================================
今天看到的OTN文档375935.1,讲的时候为什么shutdown immediate有时候会hang住。其中一个原因是因为在shutdown immediate前有大的transaction需要rollback,只能等待事务回滚完毕,数据库达到一致的状态,才能顺利shutdown.因此,shutdown数据库之前最好察看一下是否有大的transaction在运行。

select sum(used_ublk) from v$transaction;如果没有心思等待而执行了shutdown abort,则在再次启动数据库时候,startup时要做rollback回滚操作,仍然需要很多时间。长短取决于要回滚的事务的大小。

10g> select * from v$fast_start_transactions;and/orselect * from

v$fast_start_servers;
如果观察到有大的事务在运行,并且shutdown数据库不是马上要做的事情,最好等待事务执行完毕。上次我就碰到一回,shutdown immediate hang住后等了10分钟后shutdown abort,再起来又花费了10分钟左右rollback,数据库才干净的起来。


引用原文。

Applies to:
Oracle Server - Enterprise Edition - Version: 8.1.7 to 10.2
Information in this document applies to any platform.

Goal
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.

Solution
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.
Hoever, it is still possible to check the recovery operation by checking the:

select * from v$fast_start_transactions;and/orselect * 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.

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25136010/viewspace-683039/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/25136010/viewspace-683039/

<think>好的,用户需要翻译一个关于SVN存储状态和下午可能关闭的通知。首先,我需要明确用户提供的原文内容,但用户并没有直接给出具体的文本。因此,可能需要进一步询问用户提供需要翻译的具体内容。不过,根据用户之前的引用,可能涉及到SVN的存储问题,比如仓库过大导致的锁定、配置错误或迁移后的版本问题。 接下来,用户可能希望得到一个准确且专业的翻译,适合作为系统通知使用。考虑到用户之前的引用提到了SVN的下载机制、XML包体过大、文件夹锁定等问题,或许通知内容会涉及维护、存储状态警告或计划内的关闭。 需要确保翻译后的通知清晰、正式,同时技术术语准确。例如,“SVN存储状态”应译为“SVN storage status”,“可能关闭”可能用“potential shutdown”或“scheduled maintenance”。此外,时间表达需要准确,比如“下午”译为“in the afternoon”或具体时间如“2:00 PM”。 另外,用户可能在处理SVN服务器迁移后的错误,如引用[3]中的版本号问题,或许通知也需要包含维护期间可能影响版本访问的内容。需要确保翻译中包含这些技术细节,并且符合通知的正式语气。 最后,生成相关问题时要围绕SVN维护通知的翻译、处理存储问题、服务器维护最佳实践等方面,帮助用户进一步解决可能遇到的问题。</think>### 翻译建议(中英对照) #### 中文原文示例: ``` 【系统通知】 SVN存储系统当前处于高负载状态,部分仓库可能出现访问延迟。因硬件维护需要,系统将于今日下午3:00至5:00进行临时关闭。请及时保存工作进度,避免因意外中断导致版本文件锁定[^1]。 ``` #### 英文翻译: ``` [System Notice] The SVN storage system is currently under high load, and some repositories may experience access delays. Due to required hardware maintenance, the system will be temporarily shut down from 3:00 PM to 5:00 PM today. Please save your work progress promptly to avoid version file locking caused by unexpected interruptions[^1]. ``` ### 关键翻译要点 1. **技术术语准确性** - "版本文件锁定" → "version file locking"(引用SVN的锁定机制[^1]) - "高负载状态" → "under high load"(符合服务器状态描述惯例) 2. **时间格式规范** 使用 "3:00 PM" 而非 "15:00" 符合英语通知习惯 3. **风险提示强化** 增加 "unexpected interruptions" 强调潜在操作风险 ###
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值