oracle之 如何 dump logfile
这篇文章解释了如何在联机或归档重做日志文件中获取转储。
约束和限制:
1。数据库必须安装(或打开)。
更改系统转储日志文件与任何实例无关,因此不需要为其操作安装数据库。
但是,在ALTER SYSTEM DUMP REDO的情况下,系统需要知道实例是什么,以及其他日志文件在哪里。
此查找需要控制文件,因此必须安装或打开数据库。
2。DUMP REDO限制在控制文件中识别的日志文件集。
因为我们在控制文件中查找日志文件和实例,如果在控制文件中有未引用的重做日志,那么这些重做日志将不会在转储文件中被考虑。
这样做的一个例子是,如果将日志文件删除,手动或实例从RAC集群中删除。
3。所有的日志文件都必须从调用实例中访问,尽管所有的联机重做日志都存储在共享磁盘上,但是每个实例的归档日志不需要。
下面介绍了转储重做日志文件的方法:
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 sqlplus (sqldba or svrmgr for older versions), 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;
这将导致对指定范围的数据块进行所有更改。
转储到跟踪文件。在给定的示例中,所有重做文件#5的记录,
第31125至31150条被dump
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 sqlplus (sqldba or svrmgr for older versions), 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 sqlplus (sqldba or svrmgr for older versions), 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 sqlplus (sqldba or svrmgr for older versions), issue the following command:
alter session set events 'immediate trace name redohdr level 10';
For dumping archivelog header,issue the following command:
ALTER SYSTEM DUMP LOGFILE 'filename' RBA MIN 1 1 RBA MAX 1 1;
7. Dump an entire log file:
------------------------
From sqlplus (sqldba or svrmgr for older versions), 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';
补充:
ALTER SYSTEM DUMP REDO [option] .... [option];
[options] -> scn min [scn] | scn max [scn] |
dba min [file#] [block#] | dba max [file#] [block#] |
time min [ub4] | time max [ub4] |
layer [word] |
opcode [word] |
objno [word] |
xid [undoseg#] [slot#] [wrap#] |
validate
参考:How to Dump Redo Log File Information (文档 ID 1031381.6)
oracle之 如何 dump logfile的更多相关文章
- ORACLE 数据块dump
1. rdba(Tablespace relative database block address) 是相对数据块地址,是数据所在的地址,rdba可就是rowid 中rfile#+block#. 根 ...
- 如何用UltraEdit查看并修改Oracle导出的dump文件的字符集
如何查询dmp文件的字符集 用oracle的exp工具导出的dmp文件也包含了字符集信息,dmp文件的第2和第3个字节记录了dmp文件的字符集.如果dmp文件不大,比如只有几M或几十M,可以用Ultr ...
- oracle dump event
一.Memory Dumps 1).Global Area ALTER SESSION SET EVENTS 'immediate trace name global_area level n'; 1 ...
- oracle跟踪事件(dump)总结
一.Oracle跟踪文件 Oracle跟踪文件分为三种类型,一种是后台报警日志文件,记录数据库在启动.关闭和运行期间后台进程的活动情况,如表空间创建.回滚段创建.某些alter命令.日志切换.错误消息 ...
- ORACLE实例恢复过程详细分析--使用dump、BBED等多种工具结合分析
---友情提示,内容较多,可以从博文左上的+目录选择小节方便阅读. 实验思路: --实验相关TRACE文件:http://download.csdn.net/detail/q947817003/6 ...
- Oracle 11g 服务启动/关闭 及 DB dump 导入
本地启动Oracle 服务脚本 由于本地机子安装了Oracle后,会自动启动一些默认的Oracle服务,这样子会导致机子比较慢.所以需要改成手动启动/关闭服务. 即用即开,不用就关. 开启的脚本: O ...
- dump redo日志文件的信息
通常会用到以下两个命令:1.'alter session'命令用来dump redo日志的文件头2.'alter system dump logfile'命令用来dump redo文件的内容 以上命令 ...
- 查看oracle 数据库的DBID
(1)使用rman查看$ rman target /Recovery Manager: Release 11.2.0.4.0 - Production on Fri Jun 12 03:20:19 2 ...
- Oracle 修改一行数据内存主要变化
向Oracle 数据库发出请求,修改一行数据,在内存中主要有以下变化: 1. 服务器进程将包含该行数据的块读取到内存中 2. 写redo日志.将内存中该数据块指向undo表空间中数据块的变更向量(Ch ...
随机推荐
- Install SharePoint 2013 with SP1 on Windows Server 2012 R2 error - This Product requires .NF 4.5
博客地址:http://blog.csdn.net/FoxDave 最近因为项目需要要搭建SharePoint 2013的开发环境. 准备了Windows Server 2012 R2系统和Sha ...
- AssetBundle自动标签、打包
using System;using System.Collections.Generic;using System.IO;using UnityEditor;using UnityEngine; / ...
- Unity3D使用OpenFileDialog后崩溃
http://ask.unitymanual.com/question/24922 找了很久,原来是我的dll文件引错了,名字都一样,应该引用unity安装目录下的System.Window.Form
- Spring Boot 揭秘与实战 源码分析 - 工作原理剖析
文章目录 1. EnableAutoConfiguration 帮助我们做了什么 2. 配置参数类 – FreeMarkerProperties 3. 自动配置类 – FreeMarkerAutoCo ...
- [转]lua元表代码分析
http://lin-style.iteye.com/blog/1012138 版本整理日期:2011/4/21 元表其实就是可以让你HOOK掉一些操作的一张表. 表的定义在ltm.h/c的文件里.对 ...
- m3u8编码视频webgl、threejs渲染视频纹理demo
<!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <title>fz-live< ...
- 移动APP漏洞趋势
个人总结,可能片面或不正确 样本来自WooYun网站,截止15年12月19号,一共75650个漏洞: 一.Top10安全漏洞中,sql注入占1/3:可见如果你是sql注入方面的测试专家,web安全1/ ...
- Javascript class获取回调函数数据
/********************************************************************** * Javascript class获取回调函数数据 * ...
- Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.
Struts Problem Report Struts has detected an unhandled exception: Messages: Write operations are not ...
- 人工智能之KNN算法
转载自:https://www.cnblogs.com/magic-girl/p/python-kNN.html 基于python实现的KNN算法 邻近算法(k-NearestNeighbor) 是机 ...