rman 刪除指定時間點的歸檔日誌
在論壇上看到有人提問要刪除指定時間點之前的歸檔日誌,根據大家的回答,我也簡單的進行了以下測試,以下是測試過程:
RMAN> list archivelog all;
List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - ------------------- ----
74 1 47 A 2012-11-23 02:45:35 /ora10g/arch/1_47_797703448.dbf
75 1 48 A 2012-11-26 19:19:02 /ora10g/arch/1_48_797703448.dbf
76 1 49 A 2012-11-26 19:41:53 /ora10g/arch/1_49_797703448.dbf
77 1 50 A 2012-11-27 01:53:45 /ora10g/arch/1_50_797703448.dbf
78 1 51 A 2012-11-28 01:00:44 /ora10g/arch/1_51_797703448.dbf
79 1 52 A 2012-11-28 22:27:35 /ora10g/arch/1_52_797703448.dbf
80 1 53 A 2012-11-29 05:50:56 /ora10g/arch/1_53_797703448.dbf
81 1 54 A 2012-11-29 22:00:33 /ora10g/arch/1_54_797703448.dbf
RMAN>
RMAN> delete archivelog all completed before 'trunc(sysdate-1)+2/24';
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=257 devtype=DISK
List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - ------------------- ----
74 1 47 A 2012-11-23 02:45:35 /ora10g/arch/1_47_797703448.dbf
75 1 48 A 2012-11-26 19:19:02 /ora10g/arch/1_48_797703448.dbf
76 1 49 A 2012-11-26 19:41:53 /ora10g/arch/1_49_797703448.dbf
77 1 50 A 2012-11-27 01:53:45 /ora10g/arch/1_50_797703448.dbf
78 1 51 A 2012-11-28 01:00:44 /ora10g/arch/1_51_797703448.dbf
Do you really want to delete the above objects (enter YES or NO)? yes
deleted archive log
archive log filename=/ora10g/arch/1_47_797703448.dbf recid=74 stamp=800392743
deleted archive log
archive log filename=/ora10g/arch/1_48_797703448.dbf recid=75 stamp=800394114
deleted archive log
archive log filename=/ora10g/arch/1_49_797703448.dbf recid=76 stamp=800416426
deleted archive log
archive log filename=/ora10g/arch/1_50_797703448.dbf recid=77 stamp=800499645
deleted archive log
archive log filename=/ora10g/arch/1_51_797703448.dbf recid=78 stamp=800576855
Deleted 5 objects
RMAN> list archivelog all;
List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - ------------------- ----
74 1 47 A 2012-11-23 02:45:35 /ora10g/arch/1_47_797703448.dbf
75 1 48 A 2012-11-26 19:19:02 /ora10g/arch/1_48_797703448.dbf
76 1 49 A 2012-11-26 19:41:53 /ora10g/arch/1_49_797703448.dbf
77 1 50 A 2012-11-27 01:53:45 /ora10g/arch/1_50_797703448.dbf
78 1 51 A 2012-11-28 01:00:44 /ora10g/arch/1_51_797703448.dbf
79 1 52 A 2012-11-28 22:27:35 /ora10g/arch/1_52_797703448.dbf
80 1 53 A 2012-11-29 05:50:56 /ora10g/arch/1_53_797703448.dbf
81 1 54 A 2012-11-29 22:00:33 /ora10g/arch/1_54_797703448.dbf
RMAN>
RMAN> delete archivelog all completed before 'trunc(sysdate-1)+2/24';
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=257 devtype=DISK
List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - ------------------- ----
74 1 47 A 2012-11-23 02:45:35 /ora10g/arch/1_47_797703448.dbf
75 1 48 A 2012-11-26 19:19:02 /ora10g/arch/1_48_797703448.dbf
76 1 49 A 2012-11-26 19:41:53 /ora10g/arch/1_49_797703448.dbf
77 1 50 A 2012-11-27 01:53:45 /ora10g/arch/1_50_797703448.dbf
78 1 51 A 2012-11-28 01:00:44 /ora10g/arch/1_51_797703448.dbf
Do you really want to delete the above objects (enter YES or NO)? yes
deleted archive log
archive log filename=/ora10g/arch/1_47_797703448.dbf recid=74 stamp=800392743
deleted archive log
archive log filename=/ora10g/arch/1_48_797703448.dbf recid=75 stamp=800394114
deleted archive log
archive log filename=/ora10g/arch/1_49_797703448.dbf recid=76 stamp=800416426
deleted archive log
archive log filename=/ora10g/arch/1_50_797703448.dbf recid=77 stamp=800499645
deleted archive log
archive log filename=/ora10g/arch/1_51_797703448.dbf recid=78 stamp=800576855
Deleted 5 objects
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11590946/viewspace-750335/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- rman刪除指定時間的歸檔
- rman刪除指定節點指定sequence範圍的歸檔日誌
- 作用RMAN 刪除歸檔日誌
- 【Oracle】 rman 刪除歸檔日誌的命令Oracle
- RMAN刪除歸檔日誌時將ASM上空目錄同時刪除ASM
- rman刪除舊的歸檔日誌問題
- rman刪除歸檔日誌命令集
- RMAN delete archivelog命令刪除歸檔日誌及歸檔日誌拷貝deleteHive
- 用rman 正確地刪除歸檔日誌
- 歸檔日誌的刪除
- 11gR2 RMAN歸檔日誌刪除策略
- oracle刪除歸檔日誌Oracle
- Oracle歸檔日誌刪除Oracle
- 刪除歸檔日誌檔案
- 刪除data guard歸檔日誌
- 手動刪除歸檔日誌
- 配置rman來自動刪除應用過的歸檔日誌
- 刪除歸檔,保留最近的5個歸檔日誌
- RMAN刪除歸檔日誌出現RMAN-0813錯誤的處理
- oracle 刪除過期的歸檔日誌Oracle
- 歸檔日誌刪除的五種方法
- 手工rm刪除歸檔日誌對備份歸檔日誌的影響
- AIX定時刪除歸檔日誌時系統HANG住AI
- 在Oracle中,如何定時刪除歸檔日誌檔案?Oracle
- oracle rman不能自動刪除歸檔日誌備份解決Oracle
- 當ORACLE歸檔日誌滿後如何正確刪除歸檔日誌Oracle
- 誤刪歸檔日誌除導致備份歸檔日誌失敗
- 用RMAN備份歸檔日誌時檢查歸檔日誌是否存在
- 通過RMAN設定standby接收日誌後主庫歸檔日誌才可刪除
- Oralce資料庫關閉歸檔日誌並且刪除歸檔日誌資料庫
- rman清理歸檔日誌
- crontab不能自動刪除歸檔日誌
- oracle dataguard 自動刪除歸檔日誌Oracle
- 如何定期自動刪除歸檔日誌
- 【警鐘】謹慎刪除歸檔日誌
- Rman Crosscheck刪除失效歸檔ROS
- 如何正確刪除ORACLE歸檔日誌檔案Oracle
- DATAGUARD_standby刪除歸檔日誌的指令碼指令碼