dump日誌檔案的內容的研究(看別人的)
分享metalink上的doc
--------------------------------------------------------------------------------------------------
本文介紹如何dump online的日誌檔案頭部資訊(也包括歸檔)
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. (在一些診斷時,需要dump redo log file)
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.
alter session用於dump 日誌頭而‘system dump logfile' 用於dump 日誌內容。This command requires 'ALTER SYSTEM' system privilege(需要 'ALTER SYSTEM' 系統許可權). The database can be in mount, nomount or open state when the command is issued(可以是nomount狀態). 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(只要作業系統一樣,也可以dump其他資料庫的dump檔案).
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) --基於dba
2. To dump records based on RBA (Redo Block Address) --基於rda
3. To dump records based on time --基於時間
4. To dump records based on layer and opcode --基於??
5. Dump the file header information --dump頭部資訊
6. Dump an entire log file: --dump全部日誌檔案
1. To dump records based on DBA (Data Block Address) --基於dba
--------------------------------------------------
This will dump all redo records for the range of data blocks specified for a given file # and block # range. 指定檔案號和block範圍即可。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.
指定scn號和塊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:
用於dump特定重做記錄的所有日誌記錄。比如由sysdba執行的所有刪掉的行layer,與opcode應該是oracle自身的程式碼了。
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:dump online的頭部資訊。
---------------------------------
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:指定log的路徑即可,可以是其他的資料庫的
------------------------
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';
由上面的思路就可以理解為什麼lgminer可以挖掘日誌了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/288166/viewspace-967577/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- dump日誌檔案
- dump 轉儲檔案內容
- Win10如何獲取dump日誌檔案|windows10獲取dump檔案的步驟Win10Windows
- 日誌檔案的管理
- 日誌檔案的大小
- 日誌檔案和歸檔日誌檔案的關係以及如何切換日誌
- MySQLSlowlog慢查詢日誌的配置以及清空日誌內容MySql
- Linux系統日誌分為哪幾種?日誌檔案包括幾列內容?Linux
- 【IMP】使用IMP的SHOW引數輕鬆獲取EXP命令的DUMP檔案內容
- RAC的告警日誌檔案
- linux的日誌檔案Linux
- 對日誌檔案組和日誌檔案組成員的管理
- 日誌檔案的監測與檔案清理
- 【OS_Linux】刪除日誌檔案中某個時間節點之前的內容Linux
- java檔案相關(檔案追加內容、檔案內容清空、檔案內容讀取)Java
- 探究MySQL中的日誌檔案MySql
- mysql的日誌檔案詳解MySql
- 監聽日誌檔案的管理
- 重做日誌檔案中的SCN
- 更改Listener日誌檔案的位置
- window下刪除過舊的日誌檔案指令碼(如jboss的日誌檔案 資料庫的trace檔案)指令碼資料庫
- 日誌檔案太大,壓縮後,限制檔案的大小,但出現日誌檔案已經滿的告警
- php生成日誌檔案(往內接著新增內容)PHP
- 如何在 Linux 上識別同樣內容的檔案Linux
- 如何編輯PDF檔案的內容?
- 檢視檔案內容的特殊方法
- oracle redo檔案記錄的內容Oracle Redo
- MySQL資料庫中的日誌檔案---(4)配置日誌檔案輸出路徑MySql資料庫
- 限制 Apache日誌檔案大小的方法Apache
- 清理tomcat日誌大的檔案Tomcat
- 線上修改重做日誌檔案的大小
- 修改Oracle重做日誌檔案的大小Oracle
- 日誌檔案的修復小結
- 重做日誌檔案的相關操作
- 減小SQL SERVER的日誌檔案SQLServer
- 在指定的檔案過濾想要的內容
- MySQL技術內幕之“日誌檔案”MySql
- vite vue-cli 讀取檔案原始內容 使用base64內容的檔案ViteVue