[alter system dump學習1]alter system dump logfile
--------------------------------------------------------------------------------------------------
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';
文章來源:http://www.itpub.net/forum.php?mod=viewthread&tid=190873
RBA內容參考:http://space.itpub.net/23135684/viewspace-660707
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-748957/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- alter system dump datafile headerHeader
- 通過 alter system dump logfile語句dump REDO及歸檔日誌資訊示例
- alter system archive log current和alter system switch logfileHive
- ALTER SYSTEM SWITCH LOGFILE ALTER SYSTEM ARCHIVELOG CURRENT 區別Hive
- alter system switch logfile和alter system archive log current的區別Hive
- alter system switch logfile 和 alter system archive log current 的區別Hive
- [轉]alter system switch logfile和alter system archive log current的區別Hive
- zt:alter system switch logfile與ALTER SYSTEM ARCHIVE LOG CURRENT的區別Hive
- alter system archive log current / all / switch logfileHive
- alter system events與alter system event的區別
- Alter system in OracleOracle
- alter system switch logfile hang住的一種可能
- alter system kill sessionSession
- alter database和alter system和alter session的區別DatabaseSession
- alter system switch logfile的執行時間是多久。
- alter system switch logfile手工日誌切換小記
- alter system check datafiles 命令
- alter session|system set eventsSession
- ALTER SYSTEM DISCONNECT SESSION ClauseSession
- alter system archive log current noswitch!!Hive
- oracle switch logfile日誌切換及alter system checkpoint作了什麼Oracle
- 忍不住問下alter system 和alter database的區別Database
- alter system kill session 不成功Session
- alter system set events相關知識(轉帖1)
- alter system set events 相關知識
- alter system set events 知識 [final]
- oracle中Alter system 命令的總結Oracle
- alter system set events相關知識:
- alter system set events相關知識
- 【Oracle】alter system set events 相關知識Oracle
- ALTER SYSTEM KILL SESSION這麼沒力?(轉)Session
- alter system set event和set events的區別
- 停庫前執行alter system checkpoint 很重要!
- Alter system suspend/resume 導致的bug和特性
- ALTER SYSTEM 中 SCOPE=SPFILE/MEMORY/BOTH 的區別:
- alter system disconnect/kill session 'sid,serial#';Session
- ora-00054 , alter system kill session 'id,serial#'Session
- 在oracle10g執行alter system switch logfile並未開啟自動歸檔Oracle