签到成功

知道了

CNDBA社区CNDBA社区

Shutdown Normal or Shutdown Immediate Hangs. SMON disabling TX Recovery [ID 1076161.6]

2016-11-25 15:45 4299 0 原创 Oracle 故障处理
作者: dave

Shutdown Normal or Shutdown Immediate Hangs. SMON disabling TX Recovery [ID 1076161.6]


 

Modified 01-JUL-2010     Type BULLETIN     Status PUBLISHED

 

 

Checked for relevance on 04-June-2009

 

Description

===========

SHUTDOWN NORMAL or SHUTDOWN IMMEDIATE hangs. In the alert.log, you see only

the following:

 

               Shutting down instance (immediate)

               License high water mark = 12

               Thu Dec  8 18:43:16 1994http://www.cndba.cn/dave/article/546

               alter database  close normal

               Thu Dec  8 18:43:17 1994

               SMON: disabling tx recovery

               SMON: disabling cache recovery

or

        waiting for smon to disable tx recovery

 

There are no ORA errors or trace files.

 

 

 

Scope & Application

===================

Informational

 

During a SHUTDOWN IMMEDIATE and SHUTDOWN NORMAL, SMON is cleaning up extents

which are no longer needed and marking them as freed.

 

Either wait for SMON to clean up the free extents in the database as it

shuts down or perform a SHUTDOWN ABORT to shutdown the instance. A SHUTDOWNhttp://www.cndba.cn/dave/article/546

ABORT will not perform a clean shutdown.

 

Verify that temporary segments are decreasing

---------------------------------------------

To verify that the temporary segments are decreasing have an active session

available in Server Manager or SQLPLUS during the SHUTDOWN IMMEDIATE. Issue the following

query to ensure the database is not hanging, but is actually perform extent

cleanup:

 

    SVRMGR/SQL> select count(block#) from fet$;

    COUNT(BLOC

    ----------

             7

 

    SVRMGR/SQL> select count(block#) from uet$;

    COUNT(BLOC

    ----------

http://www.cndba.cn/dave/article/546

           402 

 

After some time has elapsed, reissue the query and see that the values for fet$

have increased while the values or uet$ have decreased:

 

    SVRMGR/SQL> select count(block#) from fet$;

    COUNT(BLOC

    ----------

            10http://www.cndba.cn/dave/article/546

 

    SVRMGR/SQL> select count(block#) from uet$;

    COUNT(BLOC

    ----------

           399

 http://www.cndba.cn/dave/article/546

During shutdown the SMON process is cleaning up extents and updating the data

dictionary tables with the marked free extents. As the extents are marked as http://www.cndba.cn/dave/article/546

freed, they are removed from the table for used extents, UET$ and placed on the

table for free extents, FET$.

 

How to Avoid creating many Temporary Extents

--------------------------------------------

Once the database has shutdown cleanly, to avoid creating many temporary

extents change the initial and next extent sizes on temporary tablespaces

to a more appropriate size:

 http://www.cndba.cn/dave/article/546

    ALTER TABLESPACE <temp> DEFAULT STORAGE (INITIAL <size>M/K NEXT <size>M/K);

 

Note: If the temporary tablespace is of type TEMPORARY, then this change

will only affect temporary segments created after issuing the above

command. Any existing temporary segments already in the TEMPORARY tablespace

will not be affected till the instance is restarted. On shutdown, existing

temporary segments are dropped. If the TEMPORARY TABLESPACE is of type

PERMANENT, then cleanup is performed by SMON after completion of the process

using it.

 

Increasing the initial and next extent size will decrease the number of extents

that are allocated to temporary segments. Since there are fewer extents to

deallocate, the database should shutdown more speedily.

 http://www.cndba.cn/dave/article/546

Take the following scenario:

 

A database was subject to large sorts with the following sort parameter in

the "init.ora" file:

 

         - sort_area_size=1000000

 

The temporary tablespaces for this database were all created with initial and

next extents sized at 50k and the total database size was about 300mb.  http://www.cndba.cn/dave/article/546

 

Database sorts will utilize memory as much as possible based on the "init.ora" 

parameter "sort_area_size".  Once this memory-based sort area is filled, the 

http://www.cndba.cn/dave/article/546

database will utilize the temporary table space associated with the database 

user to complete the sort operation.  During a shutdown normal, the database 

will attempt to clean up the temporary tablespaces.  

 

If a small extent size is used, then a large number of extents will be created 

for a large sort.  The cleanup of the temporary tablespace takes much longer 

with a large number of extents.

 

Note:

=====

You have to do a shutdown abort and then bring the database

back up to run the suggested queries. 

 

For other reasons for slow/hung shutdown see also these notes:

 

Note 375935.1 - What To Do and Not To Do When 'shutdown immediate' Hangs

Note 428688.1 - Bug:5057695: Shutdown Immediate Very Slow To Close Database.

  

References:

===========

Note:61997.1 SMON - Temporary Segment Cleanup and Free Space Coalescing

                     

 

Search Words:

=============

hanging

shutdown

 

 

 

 

------------------------------------------------------------------------------

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表空间和数据文件的关系,否则拒绝申请

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2239
    原创
  • 3
    翻译
  • 547
    转载
  • 186
    评论
  • 访问:6633159次
  • 积分:4249
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ