這篇文章解釋了如何在聯(lián)機(jī)或歸檔重做日志文件中獲取轉(zhuǎn)儲。
網(wǎng)站建設(shè)哪家好,找成都創(chuàng)新互聯(lián)公司!專注于網(wǎng)頁設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、重慶小程序開發(fā)、集團(tuán)企業(yè)網(wǎng)站建設(shè)等服務(wù)項(xiàng)目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了巨野免費(fèi)建站歡迎大家使用!約束和限制:
1。數(shù)據(jù)庫必須安裝(或打開)。
更改系統(tǒng)轉(zhuǎn)儲日志文件與任何實(shí)例無關(guān),因此不需要為其操作安裝數(shù)據(jù)庫。
但是,在ALTER SYSTEM DUMP REDO的情況下,系統(tǒng)需要知道實(shí)例是什么,以及其他日志文件在哪里。
此查找需要控制文件,因此必須安裝或打開數(shù)據(jù)庫。
2。DUMP REDO限制在控制文件中識別的日志文件集。
因?yàn)槲覀冊诳刂莆募胁檎胰罩疚募蛯?shí)例,如果在控制文件中有未引用的重做日志,那么這些重做日志將不會在轉(zhuǎn)儲文件中被考慮。
這樣做的一個(gè)例子是,如果將日志文件刪除,手動或?qū)嵗龔腞AC集群中刪除。
3。所有的日志文件都必須從調(diào)用實(shí)例中訪問,盡管所有的聯(lián)機(jī)重做日志都存儲在共享磁盤上,但是每個(gè)實(shí)例的歸檔日志不需要。
下面介紹了轉(zhuǎn)儲重做日志文件的方法:
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/arch2_76.dbf'
DBA MIN 5 31125
DBA MAX 5 31150;
這將導(dǎo)致對指定范圍的數(shù)據(jù)塊進(jìn)行所有更改。
轉(zhuǎn)儲到跟蹤文件。在給定的示例中,所有重做文件#5的記錄,
第31125至31150條被dump
Note
====
For 10g:
ALTER SYSTEM DUMP LOGFILE 'u01/oracle/V7323/dbs/arch2_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/arch2_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/arch2_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/arch2_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/arch2_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/arch2_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/arch2_76.dbf';
補(bǔ)充:
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之如何dumplogfile-創(chuàng)新互聯(lián)
標(biāo)題路徑:http://jinyejixie.com/article26/dehhjg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信公眾號、搜索引擎優(yōu)化、App設(shè)計(jì)、網(wǎng)站收錄、全網(wǎng)營銷推廣、網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容