Dump Redo Log File

本文介绍如何获取在线红日志文件的头部信息转储及从在线或归档红日志文件中选择性地获取信息。适用于Oracle技术支持过程中诊断数据库问题时使用。

转自:http://hi.baidu.com/zhlg_hzh/blog/item/2e86a83461568c3e5ab5f5e4.html

Dump Redo Log File
2008-06-03 15:01
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 SCN
4. To dump records based on time
5. To dump records based on layer and opcode
6. Dump the file header information
7. 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.

Note
====
For 10g:
ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf'   
    DBA MIN 5 . 31125 DBA MAX 5 . 31150;

will raise:
ORA-01963: Must specify a block number

In 10g we need to skip the dot '.' while doing the redo dumps
    ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf'
    DBA MIN 5 31125 DBA MAX 5 31150;


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 SCN
   ----------------------------

Using this option will cause redo records owning changes within the SCN range
specified to be dumped to the trace file.

ALTER SYSTEM DUMP LOGFILE 'filename'
   SCN MIN minscn
   SCN MAX maxscn;

Example:
ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch1_76.dbf'
   SCN MIN 103243
   SCN MAX 103294;

If the purpose is to check the dumpfile you can rather do the following,
SQL> ALTER SYSTEM DUMP LOGFILE 'filename' SCN MIN 1 SCN MAX 1;

If the above completes sucessfully it ensures no issues with the archivelog.


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

 

5. 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;

6. 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';


7. 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';

【直流微电网】径向直流微电网的状态空间建模与线性化:一种耦合DC-DC变换器状态空间平均模型的方法 (Matlab代码实现)内容概要:本文介绍了径向直流微电网的状态空间建模与线性化方法,重点提出了一种基于耦合DC-DC变换器状态空间平均模型的建模策略。该方法通过对系统中多个相互耦合的DC-DC变换器进行统一建模,构建出整个微电网的集中状态空间模型,并在此基础上实施线性化处理,便于后续的小信号分析与稳定性研究。文中详细阐述了建模过程中的关键步骤,包括电路拓扑分析、状态变量选取、平均化处理以及雅可比矩阵的推导,最终通过Matlab代码实现模型仿真验证,展示了该方法在动态响应分析和控制器设计中的有效性。; 适合人群:具备电力电子、自动控制理论基础,熟悉Matlab/Simulink仿真工具,从事微电网、新能源系统建模与控制研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①掌握直流微电网中多变换器系统的统一建模方法;②理解状态空间平均法在非线性电力电子系统中的应用;③实现系统线性化并用于稳定性分析与控制器设计;④通过Matlab代码复现和扩展模型,服务于科研仿真与教学实践。; 阅读建议:建议读者结合Matlab代码逐步理解建模流程,重点关注状态变量的选择与平均化处理的数学推导,同时可尝试修改系统参数或拓扑结构以加深对模型通用性和适应性的理解。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值