[20160223]檢查redo日誌的完整性.txt
[20160223]檢查redo日誌的完整性.txt
--在論壇裡問的問題:
http://www.itpub.net/thread-2053302-1-1.html
1.直接檢查dump logfile 後面加入引數validate。
SYS@book> @ &r/logfile
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME NEXT_CHANGE# NEXT_TIME GROUP# STATUS TYPE MEMBER IS_
------ ------- --------- ----------- --------- ------- --- ---------- ------------- ------------------- ------------ ------------------- ------ ---------- ---------- ----------------------------- ---
1 1 382 52428800 512 1 YES INACTIVE 1.3223E+10 2016-02-22 11:09:33 1.3223E+10 2016-02-22 22:00:13 1 ONLINE /mnt/ramdisk/book/redo01.log NO
2 1 383 52428800 512 1 YES INACTIVE 1.3223E+10 2016-02-22 22:00:13 1.3223E+10 2016-02-22 22:36:19 2 ONLINE /mnt/ramdisk/book/redo02.log NO
3 1 384 52428800 512 1 NO CURRENT 1.3223E+10 2016-02-22 22:36:19 2.8147E+14 3 ONLINE /mnt/ramdisk/book/redo03.log NO
SYS@book> alter system dump logfile '/mnt/ramdisk/book/redo03.log' validate;
System altered.
2.使用DBMS_HM包:
BEGIN
DBMS_HM.RUN_CHECK
(
check_name => 'Redo Integrity Check'
,run_name => 'redo_check'
,input_params => 'SCN_TEXT=0'
);
END;
/
--可以加入scn_text 表示從某個scn開始。
SYS@book> select dbms_hm.get_run_report('redo_check') from dual;
DBMS_HM.GET_RUN_REPORT('REDO_CHECK')
-----------------------------------------------------------------
Basic Run Information
Run Name : redo_check
Run Id : 4221
Check Name : Redo Integrity Check
Mode : MANUAL
Status : COMPLETED
Start Time : 2016-02-23 11:31:10.753766 +08:00
End Time : 2016-02-23 11:31:12.387839 +08:00
Error Encountered : 0
Source Incident Id : 0
Number of Incidents Created : 0
Input Paramters for the Run
SCN_TEXT=0
Run Findings And Recommendations
--如何刪除,僅僅知道使用adrci:
adrci> show hm_run -p "RUN_ID=4261"
ADR Home = /u01/app/oracle/diag/rdbms/book/book:
*************************************************************************
**********************************************************
HM RUN RECORD 1
**********************************************************
RUN_ID 4261
RUN_NAME redo_check1
CHECK_NAME Redo Integrity Check
NAME_ID 4
MODE 0
START_TIME 2016-02-23 11:34:27.605690 +08:00
RESUME_TIME <NULL>
END_TIME 2016-02-23 11:34:29.116844 +08:00
MODIFIED_TIME 2016-02-23 11:34:35.227078 +08:00
TIMEOUT 0
FLAGS 0
STATUS 5
SRC_INCIDENT_ID 0
NUM_INCIDENTS 0
ERR_NUMBER 0
REPORT_FILE /u01/app/oracle/diag/rdbms/book/book/hm/HMREPORT_redo_check1.hm
1 rows fetched
adrci> select * from HM_RUN where run_id=4261;
ADR Home = /u01/app/oracle/diag/rdbms/book/book:
*************************************************************************
RUN_ID RUN_NAME CHECK_NAME NAME_ID MODE START_TIME RESUME_TIME END_TIME MODIFIED_TIME TIMEOUT FLAGS STATUS SRC_INCIDENT_ID NUM_INCIDENTS ERR_NUMBER REPORT_FILE
------ ------------ -------------------- -------- ----- --------------------------------- ----------- --------------------------------- --------------------------------- ------- ----- ------ --------------- ------------- ---------- ----------------------------------------------------------------
4261 redo_check1 Redo Integrity Check 4 0 2016-02-23 11:34:27.605690 +08:00 2016-02-23 11:34:29.116844 +08:00 2016-02-23 11:34:35.227078 +08:00 0 0 5 0 0 0 /u01/app/oracle/diag/rdbms/book/book/hm/HMREPORT_redo_check1.hm
1 rows fetched
adrci> delete from HM_RUN where run_id=4261;
1 Row Deleted
adrci> commit ;
Transaction Committed
adrci> select * from HM_RUN where run_id=4261;
ADR Home = /u01/app/oracle/diag/rdbms/book/book:
*************************************************************************
0 rows fetched
3. 使用rman的validate:
RMAN> validate archivelog sequence 4830;
Starting validate at 2016-02-23 14:50:18
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
channel ORA_DISK_1: starting validation of archived log
channel ORA_DISK_1: specifying archived log(s) for validation
input archived log thread=1 sequence=4830 RECID=1626 STAMP=904574667
channel ORA_DISK_1: validation complete, elapsed time: 00:00:01
List of Archived Logs
=====================
Thrd Seq Status Blocks Failing Blocks Examined Name
---- ------- ------ -------------- --------------- ---------------
1 4830 OK 0 67 /u01/app/oracle11g/archivelog/1_4830_798551880.dbf
Finished validate at 2016-02-23 14:50:21
--理論講這個不能對redo 的STATUS=CURRENT驗證。不過可以作為一種補充方式。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8494287/viewspace-1994329/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【TUNE_ORACLE】Oracle檢查點(四)檢查點對redo日誌的影響和redo日誌大小設定建議Oracle
- redo日誌組資訊查詢
- 檢查REDO日誌相關資訊並生成HTML檔案的指令碼HTML指令碼
- 檢視Oracle的redo日誌切換頻率Oracle
- REDO日誌管理
- 檢視oracle的redo日誌組切換頻率Oracle
- [20170411]bbed計算redo檢查和.txt
- 【REDO】重做日誌檔案(redo log files)管理(增,刪,改,查,切)
- redo日誌損壞
- redo重做日誌管理
- MySQL 日誌 undo | redoMySql
- 日誌異常,IO,CPU的檢查
- 【體系結構】dump檢視update操作redo日誌
- MySQL重做日誌(redo log)MySql
- redo log日誌挖掘(二)
- redo log日誌挖掘(一)
- 【REDO】刪除REDO LOG重做日誌組後需要手工刪除對應的日誌檔案
- MySQL redo與undo日誌解析MySql
- MySQL之事務和redo日誌MySql
- REDO日誌切換頻率
- 線上重建redo log日誌組
- SQLServer的檢查點、redo和undoSQLServer
- 物件儲存服務的完整性檢查物件
- 【REDO】Oracle 日誌挖掘,分析歸檔日誌線上日誌主要步驟Oracle
- Oracle redo日誌內容探索(一)Oracle Redo
- Oracle調整redo log日誌大小Oracle
- Undo表空間與redo日誌
- DB2 的事務日誌(redo log)DB2
- RAC環境下的redo日誌組重建
- oracle redo 日誌刪除後的恢復Oracle Redo
- 管理oracle日誌之調整檢查點Oracle
- mysql開啟檢視慢查詢日誌MySql
- 檢查Linux系統日誌error和mysql錯誤日誌的指令碼薦LinuxErrorMySql指令碼
- 用RMAN備份歸檔日誌時檢查歸檔日誌是否存在
- mysql 日誌之慢查詢日誌MySql
- oracle丟失的是所有的redo日誌組Oracle
- MySQL 5.6修改REDO日誌的大小和個數MySql
- 【redo】日誌檔案的丟失解決方法