如何刪除控制檔案中過去rman備份到磁帶的歸檔備份集
pub 上的一個帖子,分享一下:
環境介紹:
資料庫版本為9201。原作業系統是solaris8,原備份方式是rman透過tsm備份到磁帶。由於原伺服器不能滿足生產需要更新了伺服器,將資料庫遷移至新的資料庫伺服器,作業系統是solaris10,rman備份到磁碟。遷移的方式是tar過去的。原伺服器rman實際是是有一個catalog庫的,新伺服器rman使用的是控制檔案。
問題:由於整個資料庫都是tar過來的,控制檔案儲存著過去的備份資訊(不知為啥控制檔案怎麼會保持了一次rman的備份資訊,因為備份走的是資料庫),因為過去是備份到磁帶使用的是sbt_tape通道。現在是盤使用的是disk通道。所以刪除不掉控制檔案裡的過去備份資訊。
具體現象:
RMAN> DELETE NOPROMPT OBSOLETE;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 4 days
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 4943 11-APR-10
Backup Piece 4943 11-APR-10 arch_20100411_4970_1
Backup Set 4948 12-APR-10
Backup Piece 4948 12-APR-10 arch_20100412_4976_1
Backup Set 4949 12-APR-10
Backup Piece 4949 12-APR-10 arch_20100412_4975_1
Backup Set 4954 13-APR-10
Backup Piece 4954 13-APR-10 arch_20100413_4982_1
Backup Set 4955 13-APR-10
Backup Piece 4955 13-APR-10 arch_20100413_4981_1
Backup Set 4960 14-APR-10
Backup Piece 4960 14-APR-10 arch_20100414_4987_1
Backup Set 4961 14-APR-10
Backup Piece 4961 14-APR-10 arch_20100414_4988_1
Backup Set 4966 15-APR-10
Backup Piece 4966 15-APR-10 arch_20100415_4994_1
Backup Set 4967 15-APR-10
Backup Piece 4967 15-APR-10 arch_20100415_4993_1
Backup Set 4972 16-APR-10
Backup Piece 4972 16-APR-10 arch_20100416_5000_1
Backup Set 4973 16-APR-10
Backup Piece 4973 16-APR-10 arch_20100416_4999_1
Backup Set 5114 28-APR-10
Backup Piece 5114 28-APR-10 /DMCDBS01/rman/31lc914d_1_1
Backup Set 5115 28-APR-10
Backup Piece 5115 28-APR-10 /DMCDBS01/rman/32lc914d_1_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of delete command at 05/03/2010 15:04:50
RMAN-06091: no channel allocated for maintenance (of an appropriate type)
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 4 days
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 4943 11-APR-10
Backup Piece 4943 11-APR-10 arch_20100411_4970_1
Backup Set 4948 12-APR-10
Backup Piece 4948 12-APR-10 arch_20100412_4976_1
Backup Set 4949 12-APR-10
Backup Piece 4949 12-APR-10 arch_20100412_4975_1
Backup Set 4954 13-APR-10
Backup Piece 4954 13-APR-10 arch_20100413_4982_1
Backup Set 4955 13-APR-10
Backup Piece 4955 13-APR-10 arch_20100413_4981_1
Backup Set 4960 14-APR-10
Backup Piece 4960 14-APR-10 arch_20100414_4987_1
Backup Set 4961 14-APR-10
Backup Piece 4961 14-APR-10 arch_20100414_4988_1
Backup Set 4966 15-APR-10
Backup Piece 4966 15-APR-10 arch_20100415_4994_1
Backup Set 4967 15-APR-10
Backup Piece 4967 15-APR-10 arch_20100415_4993_1
Backup Set 4972 16-APR-10
Backup Piece 4972 16-APR-10 arch_20100416_5000_1
Backup Set 4973 16-APR-10
Backup Piece 4973 16-APR-10 arch_20100416_4999_1Backup Set 5114 28-APR-10
Backup Piece 5114 28-APR-10 /DMCDBS01/rman/31lc914d_1_1
Backup Set 5115 28-APR-10
Backup Piece 5115 28-APR-10 /DMCDBS01/rman/32lc914d_1_1
Backup Set 5116 28-APR-10
Backup Piece 5116 28-APR-10 /DMCDBS01/rman/33lc925m_1_1
Backup Set 5117 28-APR-10
Backup Piece 5117 28-APR-10 /DMCDBS01/rman/34lc92rt_1_1
Backup Set 5119 29-APR-10
Backup Piece 5119 29-APR-10 /DMCDBS01/rman/full_20100429_5223_1
Backup Set 5120 29-APR-10
Backup Piece 5120 29-APR-10 /DMCDBS01/rman/full_20100429_5222_1
RMAN>
紅色字的部分無法刪除
RMAN> list backupset of archivelog all;
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
4943 838M SBT_TAPE 00:00:35 11-APR-10
BP Key: 4943 Status: UNAVAILABLE Tag: TAG20100411T004252
Piece Name: arch_20100411_4970_1
List of Archived Logs in backup set 4943
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 16014 4006475789091 10-APR-10 4006475846928 10-APR-10
1 16015 4006475846928 10-APR-10 4006475885650 10-APR-10
1 16016 4006475885650 10-APR-10 4006475943776 10-APR-10
1 16017 4006475943776 10-APR-10 4006475979118 10-APR-10
1 16018 4006475979118 10-APR-10 4006476023785 10-APR-10
1 16019 4006476023785 10-APR-10 4006476071180 10-APR-10
1 16020 4006476071180 10-APR-10 4006476158466 10-APR-10
1 16021 4006476158466 10-APR-10 4006476250848 10-APR-10
1 16022 4006476250848 10-APR-10 4006525513941 11-APR-10
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
4948 517M SBT_TAPE 00:00:29 12-APR-10
BP Key: 4948 Status: AVAILABLE Tag: TAG20100412T002657
Piece Name: arch_20100412_4976_1
List of Archived Logs in backup set 4948
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 16030 4006527200207 11-APR-10 4006527247642 11-APR-10
1 16031 4006527247642 11-APR-10 4006527316362 11-APR-10
1 16032 4006527316362 11-APR-10 4006527374966 11-APR-10
1 16033 4006527374966 11-APR-10 4006527472280 11-APR-10
1 16034 4006527472280 11-APR-10 4006528044006 11-APR-10
1 16035 4006528044006 11-APR-10 4006576257046 12-APR-10
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
4949 699M SBT_TAPE 00:00:34 12-APR-10
BP Key: 4949 Status: AVAILABLE Tag: TAG20100412T002657
Piece Name: arch_20100412_4975_1
List of Archived Logs in backup set 4949
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 16023 4006525513941 11-APR-10 4006526965047 11-APR-10
1 16024 4006526965047 11-APR-10 4006527011565 11-APR-10
1 16025 4006527011565 11-APR-10 4006527053186 11-APR-10
1 16026 4006527053186 11-APR-10 4006527088851 11-APR-10
1 16027 4006527088851 11-APR-10 4006527134651 11-APR-10
1 16028 4006527134651 11-APR-10 4006527173324 11-APR-10
1 16029 4006527173324 11-APR-10 4006527200207 11-APR-10
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
4954 591M SBT_TAPE 00:00:28 13-APR-10
BP Key: 4954 Status: AVAILABLE Tag: TAG20100413T004133
Piece Name: arch_20100413_4982_1
List of Archived Logs in backup set 4954
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 16043 4006577315888 12-APR-10 4006577356109 12-APR-10
1 16044 4006577356109 12-APR-10 4006577411421 12-APR-10
1 16045 4006577411421 12-APR-10 4006577476948 12-APR-10
1 16046 4006577476948 12-APR-10 4006577555193 12-APR-10
1 16047 4006577555193 12-APR-10 4006603910220 12-APR-10
1 16048 4006603910220 12-APR-10 4006629912732 13-APR-10
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
4955 699M SBT_TAPE 00:00:50 13-APR-10
BP Key: 4955 Status: AVAILABLE Tag: TAG20100413T004133
Piece Name: arch_20100413_4981_1
List of Archived Logs in backup set 4955
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 16036 4006576257046 12-APR-10 4006577063714 12-APR-10
1 16037 4006577063714 12-APR-10 4006577104776 12-APR-10
1 16038 4006577104776 12-APR-10 4006577149346 12-APR-10
1 16039 4006577149346 12-APR-10 4006577197593 12-APR-10
1 16040 4006577197593 12-APR-10 4006577231743 12-APR-10
1 16041 4006577231743 12-APR-10 4006577284073 12-APR-10
1 16042 4006577284073 12-APR-10 4006577315888 12-APR-10
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
4960 699M SBT_TAPE 00:00:38 14-APR-10
BP Key: 4960 Status: AVAILABLE Tag: TAG20100414T002627
Piece Name: arch_20100414_4987_1
List of Archived Logs in backup set 4960
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 16049 4006629912732 13-APR-10 4006630718989 13-APR-10
1 16050 4006630718989 13-APR-10 4006630767891 13-APR-10
1 16051 4006630767891 13-APR-10 4006630818858 13-APR-10
1 16052 4006630818858 13-APR-10 4006630866098 13-APR-10
1 16053 4006630866098 13-APR-10 4006630920332 13-APR-10
1 16054 4006630920332 13-APR-10 4006630961115 13-APR-10
1 16055 4006630961115 13-APR-10 4006631015429 13-APR-10
可見裝置型別都是磁帶
我的目的是如何能把這部分資訊刪除掉我能夠正常的DELETE NOPROMPT OBSOLETE;
解決方法:
Suppose your current backup strategy uses only disk, but you have several old tape
backups you want to get rid of. You can allocate a maintenance channel for performing the
deletion of the tape backups by using the dummy sbt API (because the media manager isn’t
available any longer). You can then use the delete obsolete command to remove the tape
backups. Here’s an example showing how to do those things:
RMAN> allocate channel for maintenance device type sbt
parms 'SBT_LIBRARY=oracle.disksbt,
ENV=(BACKUP_DIR=/tmp)';
RMAN> delete obsolete;
Although the media manager isn’t available any longer, RMAN simulates a callout to the
media management layer (MML) and successfully initiates the maintenance command to
delete the old tape backups you want toget rid of.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22664653/viewspace-666334/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 刪除控制檔案中的磁帶備份資訊
- RMAN說,我能備份(5)--RMAN備份歸檔檔案
- 【RMAN】Oracle中如何備份控制檔案?備份控制檔案的方式有哪幾種?Oracle
- Rman Crosscheck刪除失效歸檔-備份恢復ROS
- rman全庫備份備份歸檔日誌檔案
- dump備份並定時刪除過去檔案
- 【備份】RMAN中對控制檔案的幾種備份方法
- RMAN備份資料檔案+控制檔案+歸檔日誌
- RMAN說,我能備份(4)--RMAN備份資料檔案和控制檔案
- DELETE OBSOLETE不刪除歸檔日誌以及歸檔的備份集delete
- RMAN備份之備份多個備份集到帶庫(三)
- RMAN備份之備份多個備份集到帶庫(二)
- RMAN備份之備份多個備份集到帶庫(一)
- 備份之控制檔案備份
- 10g R2 rman backup database 控制檔案備份後於備份集備份Database
- rman給歸檔指定備份位置;庫先備份盤同時到帶庫;更改控制檔案自備路徑;時間點的恢復
- ORACLE NBU調取oracle rman指令碼備份歸檔不自動刪除歸檔Oracle指令碼
- rman備份但丟失一個資料檔案,但有歸檔備份
- 使用logmnr,在RMAN備份檔案中恢復備份的歸檔日誌檔案進行分析
- 只有rman備份集,控制檔案丟失的恢復
- RMAN備份多個備份集到帶庫的小bug
- rman備份-(1) 利用備份級恢復資料檔案和控制檔案
- 備份控制檔案
- RMAN備份歸檔日誌多份 %c
- 【備份恢復】利用 備份控制檔案到指定目錄下的控制檔案 恢復控制檔案
- 利用tar向磁帶備份恢復檔案
- 無備份恢復(歸檔模式)已刪除資料檔案模式
- 刪除歸檔物理檔案備份失敗!ORA-19625
- RMAN備份檔案格式
- oracle rman不能自動刪除歸檔日誌備份解決Oracle
- rman備份檔案的格式
- Windows 10刪除備份檔案方法Windows
- RMAN恢復(rman只備份資料庫,但不備份歸檔,歸檔透過簡單的rsync或scp來傳送到異地備份)資料庫
- oracle 如何不備份已經備份的歸檔Oracle
- rman備份丟失控制檔案恢復
- 備份歸檔日誌檔案
- rman開啟備份優化對備份歸檔的影響優化
- win10怎麼刪除舊系統備份_win10如何刪除備份檔案Win10