查看: 2552|回复: 2

學習 alter system dump .......(metalink)

[复制链接]
论坛徽章:
124
生肖徽章:马
日期:2007-09-26 12:36:24生肖徽章:马
日期:2007-09-26 17:03:45生肖徽章:马
日期:2007-09-26 17:03:35生肖徽章:马
日期:2007-09-26 17:02:38生肖徽章:马
日期:2007-09-26 17:02:07生肖徽章:马
日期:2007-09-26 17:02:01生肖徽章:马
日期:2007-09-26 17:02:00生肖徽章:马
日期:2007-09-26 17:01:53生肖徽章:马
日期:2007-09-26 12:38:07生肖徽章:马
日期:2007-09-26 12:37:55
跳转到指定楼层
1#
发表于 2004-1-29 10:25 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
分享metalink上的doc
--------------------------------------------------------------------------------------------------

PURPOSE This article explain how to obtain a dump of the header information in the  online redo log file(s), as well as obtaining selected information from the  online or archived redo log files.  

SCOPE & APPLICATION Informational

You are working with Oracle Technical Support.  As part of the diagnostic  process, you have been asked to take a dump of the redo log files.   The  information in the logs is often used to help diagnose corruption issues.

The following commands will be used in this process:      
1.  The 'alter session' command is used to dump redo headers.     
2.  Use the 'alter system dump logfile' to dump log file contents.

This command requires 'ALTER SYSTEM' system privilege. The database can be in  mount, nomount or open state when the command is issued.  An online log file  or an archived log file can be dumped.  It is even possible to dump a  file from another database, as long as the operating systems are the same.

Output from the command is put into the session's trace file.  

The following ways of dumping a redo log file are covered:

1. To dump records based in DBA (Data Block Address)
2. To dump records based on RBA (Redo Block Address)  
3. To dump records based on time
4. To dump records based on layer and opcode
5. Dump the file header information
6. Dump an entire log file:  

1. To dump records based on DBA  (Data Block Address)   
--------------------------------------------------   
This will dump all redo records for the range of data   blocks specified for a given file # and block # range.   
From sqldba or svrmgr, issue the following command:  

ALTER SYSTEM DUMP LOGFILE 'filename'   
DBA MIN fileno . blockno     
DBA MAX fileno . blockno;            
Example:
          ========
         ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf'
         DBA MIN 5 . 31125
         DBA MAX 5 . 31150;

This will cause all the changes to the specified range of data blocks to be   dumped to the trace file.  In the example given, all redo records for file #5,   blocks 31125 thru 31150 are dumped.   

2. To dump records based on RBA (Redo Block Address)
    -------------------------------------------------
This will dump all redo records for the range of redo   addresses specified for the given sequence number and block number.

Syntax:
  ALTER SYSTEM DUMP LOGFILE 'filename'
    RBA MIN seqno . blockno
    RBA MAX seqno . blockno;  
Example:
  ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf'
    RBA MIN 2050 . 13255
    RBA MAX 2255 . 15555;

3. To dump records based on time.
    ------------------------------  
Using this option will cause redo records created within the time range   specified to be dumped to the trace file.

From sqldba or svrmgr, issue the following command:
ALTER SYSTEM DUMP LOGFILE 'filename'
    TIME MIN value
     TIME MAX value;  

        Example:
         ========
         ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf'
         TIME MIN 299425687
         TIME MAX 299458800;
        Please Note: the time value is given in REDO DUMP TIME  

4. To dump records based on layer and opcode.
     ------------------------------------------  
LAYER and OPCODE are used to dump all log records for a particular type of  redo record, such as all dropped row pieces.   
From sqldba or svrmgr, issue the following command:  

ALTER SYSTEM DUMP LOGFILE 'filename'
    LAYER value
     OPCODE value;
           Example:
         ========
         ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf'
         LAYER 11
         OPCODE 3;  

5. Dump the file header information:
     ---------------------------------
    This will dump file header information for every  online redo log file.    From sqldba or svrmgr, issue the following command:
         alter session set events 'immediate trace name redohdr level 10';  

6. Dump an entire log file:
     ------------------------
   From sqldba or svrmgr, issue the following command:
    ALTER SYSTEM DUMP LOGFILE 'filename';
    Please note:
  Fully qualify the filename, and include the single quotes.

  Example:
   ========
  ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf';
招聘 : 系统架构师
论坛徽章:
372
双子座
日期:2015-08-18 12:18:21摩羯座
日期:2015-09-20 17:10:27秀才
日期:2015-09-21 09:46:16秀才
日期:2015-09-21 11:16:42秀才
日期:2015-10-08 17:57:58天枰座
日期:2015-10-28 18:28:29秀才
日期:2015-11-11 09:48:44秀才
日期:2015-11-11 10:07:14秀才
日期:2015-11-11 10:22:49秀才
日期:2015-09-11 10:43:06
2#
发表于 2004-1-29 14:34 | 只看该作者

good

顶!!
还有其他的一并传上来,辛苦你了!!

使用道具 举报

回复
论坛徽章:
124
生肖徽章:马
日期:2007-09-26 12:36:24生肖徽章:马
日期:2007-09-26 17:03:45生肖徽章:马
日期:2007-09-26 17:03:35生肖徽章:马
日期:2007-09-26 17:02:38生肖徽章:马
日期:2007-09-26 17:02:07生肖徽章:马
日期:2007-09-26 17:02:01生肖徽章:马
日期:2007-09-26 17:02:00生肖徽章:马
日期:2007-09-26 17:01:53生肖徽章:马
日期:2007-09-26 12:38:07生肖徽章:马
日期:2007-09-26 12:37:55
3#
 楼主| 发表于 2004-1-29 14:36 | 只看该作者
以前不清楚,看了以后知道了一點!我以為沒有人想看(對象我這樣的初學者還是有用的!)我就為它花過心思,因為被 上過課,看高手們說這個tarce好個tarce就是不知道怎么做,累呀!

謝謝樓上說好啦!

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表