How to operate an oracle database dumplogfile ?, Oracledumplogfile
This article explains how to get a dump in an online or archived redo log file.
Constraints and restrictions:
1. The database must be installed (or opened ).
Changing the system dump log file is irrelevant to any instance, so you do not need to install the database for its operations.
However, in the case of alter system dump redo, the SYSTEM needs to know what the instance is and where other log files are.
This search requires control files, so you must install or open the database.
2. Dump redo limits the collection of log files recognized in control files.
Because we look for log files and instances in the control file. If there are unreferenced redo logs in the control file, these redo logs will not be considered in the dump file.
In this example, if you delete a log file, manually or the instance is deleted from the RAC cluster.
3. All log files must be accessed from the calling instance. Although all online redo logs are stored on the shared disk, archiving logs for each instance are not required.
The following describes how to dump the redo log file:
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'
DBAs MIN 5 31125
Dba max 5 31150;
This will cause all changes to data blocks within the specified range.
Dump to the trace file. In the given example, all records redo file #5,
31,125th to 31150 dump
Note
====
For 10g:
Alter system dump logfile 'u01/oracle/V7323/dbs/arch1_76.dbf'
Dba min 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 participant type
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 ';
Supplement:
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
Reference: How to Dump Redo Log File Information (Document ID 1031381.6)