Backup And Recovery User's Guide-從RMAN開始-驗證資料庫檔案和備份

LuiseDalian發表於2014-02-13

可以使用VALIDATE命令來驗證所有的資料檔案存在、位於它們正確的位置上、沒有物理損壞。

CHECK LOGICAL選項用於驗證邏輯塊損壞。

練習:驗證資料檔案

--1. 啟動RMAN連線到目標資料庫

--2. 對希望驗證的檔案執行BACKUP VALIDATE

--2.1 對所有的資料檔案和歸檔重做日誌檔案的物理和邏輯損壞進行驗證

RMAN> backup validate check logical database archivelog all;

 

Starting backup at 06-JUL-13

using channel ORA_DISK_1

specification does not match any archived log in the repository

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/TestDB12/system01.dbf

input datafile file number=00002 name=/u01/app/oracle/oradata/TestDB12/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/TestDB12/example01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/TestDB12/undotbs01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/TestDB12/users01.dbf

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:26

List of Datafiles

=================

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN

---- ------ -------------- ------------ --------------- ----------

1    OK     0              15544        92200           1143134  

  File Name: /u01/app/oracle/oradata/TestDB12/system01.dbf

  Block Type Blocks Failing Blocks Processed

  ---------- -------------- ----------------

  Data       0              60318          

  Index      0              12678          

  Other      0              3620           

 

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN

---- ------ -------------- ------------ --------------- ----------

2    OK     0              23712        72968           1143132  

  File Name: /u01/app/oracle/oradata/TestDB12/sysaux01.dbf

  Block Type Blocks Failing Blocks Processed

  ---------- -------------- ----------------

  Data       0              11647          

  Index      0              8271           

  Other      0              29330          

 

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN

---- ------ -------------- ------------ --------------- ----------

3    OK     0              129          14720           1143134   

  File Name: /u01/app/oracle/oradata/TestDB12/undotbs01.dbf

  Block Type Blocks Failing Blocks Processed

  ---------- -------------- ----------------

  Data       0              0              

  Index      0              0              

  Other      0              14591          

 

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN

---- ------ -------------- ------------ --------------- ----------

4    OK     0              18           667             1071732  

  File Name: /u01/app/oracle/oradata/TestDB12/users01.dbf

  Block Type Blocks Failing Blocks Processed

  ---------- -------------- ----------------

  Data       0              91             

  Index      0              39             

  Other      0              492            

 

File Status Marked Corrupt Empty Blocks Blocks Examined High SCN

---- ------ -------------- ------------ --------------- ----------

5    OK     0              33651        44241           1074245  

  File Name: /u01/app/oracle/oradata/TestDB12/example01.dbf

  Block Type Blocks Failing Blocks Processed

  ---------- -------------- ----------------

  Data       0              6600           

  Index      0              1148           

  Other      0              2841           

 

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

including current SPFILE in backup set

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

List of Control File and SPFILE

===============================

File Type    Status Blocks Failing Blocks Examined

------------ ------ -------------- ---------------

SPFILE       OK     0              2              

Control File OK     0              594            

Finished backup at 06-JUL-13

 

--2.2 驗證單獨的資料塊

sys@TESTDB12>col file_name for a60

sys@TESTDB12>select tablespace_name, file_name, file_id, bytes/1024/1024 from dba_data_files;

 

TABLESPACE_NAME              FILE_NAME                                                       FILE_ID  BYTES/1024/1024

-------------------------  ----------------------------------------------------   -------- -----------------

USERS                          /u01/app/oracle/oradata/TestDB12/users01.dbf                     4                    5

UNDOTBS1                       /u01/app/oracle/oradata/TestDB12/undotbs01.dbf                  3                 115

SYSAUX                         /u01/app/oracle/oradata/TestDB12/sysaux01.dbf  &nbs

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17013648/viewspace-1080534/,如需轉載,請註明出處,否則將追究法律責任。

相關文章