Using RMAN to Validate Database Files

概述

介紹下通過rman去Validate Database Files

Using RMAN to Validate Database Files

You can use the VALIDATE option of the BACKUP command to verify that database files exist and are in the correct locations, and have no physical or logical corruptions that would prevent RMAN from creating backups of them. When performing a BACKUP... VALIDATE, RMAN reads the files to be backed up in their entirety, as it would during a real backup. It does not, however, actually produce any backup sets or image copies.

您可以使用BACKUP命令的VALIDATE選項來驗證數據庫文件是否存在並位於正確的位置,並且沒有防止RMAN創建其備份的物理或邏輯損壞。執行備份時…驗證,RMAN將讀取所有要備份的文件,就像在真正的備份中那樣。然而,它實際上不生成任何備份集或圖像副本。


If the backup validation discovers corrupt blocks, then RMAN updates the V$DATABASE_BLOCK_CORRUPTION view with rows describing the corruptions. You can repair corruptions using block media recovery, documented in Oracle Database Backup and Recovery Advanced User's Guide. After a corrupt block is repaired, the row identifying this block is deleted from the view.

如果備份驗證發現損壞的塊,則RMAN使用描述損壞的行更新V$DATABASE_BLOCK_CORRUPTION視圖。您可以使用Oracle數據庫備份和恢復高級用戶指南中記錄的塊媒體恢復來修復損壞。在修復損壞塊之後,從視圖中刪除標識此塊的行。


For example, you can validate that all database files and archived logs can be backed up by running a command as follows:

BACKUP VALIDATE DATABASE ARCHIVELOG ALL;

The RMAN client displays the same output that it would if it were really backing up the files. If RMAN cannot validate the backup of one or more of the files, then it issues an error message. For example, RMAN may show output similar to the following:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 08/29/2002 14:33:47
ORA-19625: error identifying file /oracle/oradata/trgt/arch/archive1_6.dbf
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3

You cannot use the MAXCORRUPT or PROXY parameters with the VALIDATE option.


後期會分享更多DBA內容,感興趣的朋友可以關注下!

Using RMAN to Validate Database Files


分享到:


相關文章: