RMAN-03002 RMAN-06091 錯誤解決方案

來源:互聯網
上載者:User

客戶自從使用nbu 以來一直報這個錯誤。因為以前一直都是正常的。所以晚上先讓停止了nbu的備份。單獨使用以前的指令碼正常。報錯資訊一樣。所以懷疑是不是指令碼的問題。
查詢網上分析原因如下:

Symptoms
When attempting to delete obsolete backups from RMAN using the following command:

RMAN> delete obsolete;

the following error occurs:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of delete command at 05/07/2008 22:04:21
RMAN-06091: no channel allocated for maintenance (of an appropriate type)

.


Cause
Tape channel had not being allocated when attempt to delete obsolete backup on tape.


Using the following command to verify that there are backup sets on tape.


RMAN> list backup;
List of Backup Sets
===================

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Incr 0 113.25M SBT_TAPE 00:08:35 01-MAR-08
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: HOT_DB_BK_LEVEL0
Handle: bk_4_1_648250152 Media:
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
5 0 Incr 1342657 01-MAR-08 /u01/Oracle/app/oracle/oradata/test/undotbs2
75 0 Incr 1342657 01-MAR-08 /u01/oracle/app/oracle/oradata/test/USER_DAT_08_vg3_002
91 0 Incr 1342657 01-MAR-08 /u01/oracle/app/oracle/oradata/test/USER_DAT_12_vg3_002

==>The Device Type is SBT_TAPE.

Solution
To implement the solution, please execute the following steps:

Please run the following commands to delete obsolete backup sets on both disk and tape:

RMAN> allocate channel for maintenance type disk;
RMAN> allocate channel for maintenance device type 'sbt_tape' PARMS '...';
==>Please change '...' to your actual tape params
RMAN> delete obsolete;


If you want to delete obsolete backup sets on disk, you can use the following commands:
RMAN> allocate channel for maintenance type disk;
RMAN> delete obsolete device type disk;、

說的很明白說是沒有分配為維護通道。

我只修改了rman_backup.sh中的語句。
#delete noprompt obsolete;
#allocate channel c1 type disk;
將上面的語句改為下面的。
allocate channel for maintenance type disk; #this is add by yt 2012 2 21
delete obsolete device type disk; #this is add by yt 2012 2 21

 

我試著單獨執行這兩句:

RMAN> allocate channel for maintenance type disk;

allocated channel: ORA_MAINT_DISK_2
channel ORA_MAINT_DISK_2: sid=736 instance=cmsxty1 devtype=DISK

RMAN> delete noprompt obsolete device type disk;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Deleting the following obsolete backups and copies:
Type                Key    Completion Time    Filename/Handle
-------------------- ------ ------------------ --------------------
Control File Copy    1      01-JAN-12          /backup/1101/standby01.ctl

RMAN-06207: WARNING: 1 objects could not be deleted for DISK channel(s) due
RMAN-06208:          to mismatched status.  Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212:  Object Type  Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Datafile Copy  /backup/1101/standby01.ctl

提示我 有個備份找不到不讓刪除。

繼續執行下面的語句

RMAN>DELETE FORCE NOPROMPT OBSOLETE DEVICE TYPE DISK;

刪除成功。

看了少了個force,至於這個force在這裡的作用我下來得好好研究下。

最後指令碼更改如下。備份正常。

run {
allocate channel c1 type disk;
backup database include current controlfile format '/backup/rman_cmsxty_full_%s_%T.bak';
sql 'alter system archive log current';
backup archivelog all delete input format '/backup/rman_cmsxty_arc_%s_%T.bak';
backup current controlfile format '/backup/rman_cmsxty_ctl_%s_%T.bak';
release channel c1;
}
report obsolete;
crosscheck archivelog all;
crosscheck backup;
allocate channel for maintenance type disk;
DELETE FORCE NOPROMPT OBSOLETE DEVICE TYPE DISK;
EOF

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.