RMAN命令大全

xypincle發表於2017-03-25

  1.     1、SHOW命令:
  2.   顯示rman配置:
  3.     RMAN> show all;
  4.   2、REPORT命令:
  5.   2.1、RMAN> report schema 報告目標資料庫的物理結構;
  6.   2.2、RMAN>report need backup days=3; 報告最近3天沒有被備份的資料檔案;
  7.   2.3、RMAN> report need backup days 3 tablespace users; 在USERS表空間上3天未備份的資料檔案;
  8.   2.4、RMAN> report need backup incremental 3; 報告恢復資料檔案需要的增量備份個數超過3次的資料檔案;
  9.   2.5、RMAN> report need backup redundancy 2 database; 報告備份檔案低於2份的所有資料檔案;
  10.   2.6、RMAN> report need backup recovery window of 6 days; 報告檔案報表的恢復需要超過6天的歸檔日誌的資料檔案;
  11.   2.7、RMAN> report unrecoverable; 報告資料庫所有不可恢復的資料檔案;
  12.   2.8、RMAN> report obsolete redunndancy 2; 報告備份次數超過2次的陳舊備份;
  13.   2.9、RMAN>report obsolete; 報告多餘的備份;
  14.   3、LIST命令:列出備份資訊
  15.   3.1、列出資料檔案備份集
  16.   RMAN>list backup 列出詳細備份;
  17.   RMAN>list expired backup 列出過期備份;
  18.   RMAN> list backup of database; 列出所有資料檔案的備份集;
  19.   RMAN> list backup of tablespace user01; 列出特定表空間的所有資料檔案備份集;
  20.   3.2、RMAN> list backup of controlfile 列出控制檔案備份集;
  21.   3.3、RMAN> list backup of archivelog all 列出歸檔日誌備份集詳細資訊;
  22.   RMAN>list archivelog all;      列出歸檔日誌備份集簡要資訊
  23.   3.4、RMAN> list backup of spfile 列出SPFILE備份集;
  24.   3.5、RMAN> list copy of datafile 5 列出資料檔案映像副本;
  25.   3.6、RMAN> list copy of controlfile 列出控制檔案映像副本;
  26.   3.7、RMAN> list copy of archivelog all 列出歸檔日誌映像副本;
  27.   3.8、RMAN> list incarnation of database 列出對應物/列出資料庫副本;
  28.   3.9、RMAN>list backup summary; 概述可用的備份;
  29.   B表示backup
  30.   F表示FULL
  31.   A表示archive log
  32.   0 1表示incremental backup
  33.   S說明備份狀態(A AVAILABLE   X EXPIRED )
  34.   3.10、RMAN>list backup by file 按備份型別列出備份;
  35.   按照資料檔案備份,歸檔日誌備份,控制檔案備份,伺服器引數檔案備份 列出
  36.   4、CROSSCHECK命令:校驗備份資訊
  37.   4.1、RMAN> crosscheck backup 核對所有備份集;
  38.   4.2、RMAN> crosscheck backup of database 核對所有資料檔案的備份集;
  39.   4.3、RMAN> crosscheck backup of tablespace users 核對特定表空間的備份集;
  40.   4.4、RMAN> crosscheck backup of datafile 4 核對特定資料檔案的備份集;
  41.   4.5、RMAN> crosscheck backup of controlfile 核對控制檔案的備份集;
  42.   4.6、RMAN> crosscheck backup of spfile 核對SPFILE的備份集;
  43.   4.7、RMAN> crosscheck backup of archivelog sequence 3 核對歸檔日誌的備份集;
  44.   4.8、RMAN> crosscheck copy 核對所有映像副本;
  45.   4.9、RMAN> crosscheck copy of database 核對所有資料檔案的映像副本;
  46.   4.10、RMAN> crosscheck copy of tablespace users 核對特定表空間的映像副本;
  47.   4.11、RMAN> crosscheck copy of datafile 6 核對特定資料檔案的映像副本;
  48.   4.12、RMAN> crosscheck copy of archivelog sequence 4 核對歸檔日誌的映像副本;
  49.   4.13、RMAN> crosscheck copy of controlfile 核對控制檔案的映像副本;
  50.   4.14、RMAN> crosscheck backup tag='SAT_BACKUP';
  51.   4.15、RMAN> crosscheck backup completed after 'sysdate - 2'
  52.   4.16、RMAN> crosscheck backup completed between 'sysdate - 5' and 'sysdate -2 '
  53.   4.17、RMAN> crosscheck backup device type sBT;
  54.   4.18、RMAN> crosscheck archivelog all;
  55.   4.19、RMAN> crosscheck archivelog like '%ARC00012.001'
  56.   4.20、RMAN> crosscheck archivelog from sequence 12;
  57.   4.21、RMAN> crosscheck archivelog until sequence 522;
  58.   5、DELETE:刪除備份
  59.   5.1、RMAN> delete obsolete; 刪除陳舊備份;
  60.   5.2、RMAN> delete expired backup; 刪除EXPIRED備份
  61.   5.3、RMAN> delete expired copy; 刪除EXPIRED副本;
  62.   5.4、RMAN> delete backupset 19; 刪除特定備份集;
  63.   5.5、RMAN> delete backuppiece ''d:backupDEMO_19.bak'' 刪除特定備份片;
  64.   5.6、RMAN> delete backup 刪除所有備份集;
  65.   5.7、RMAN> delete datafilecopy ''d:backupDEMO_19.bak'' 刪除特定映像副本;
  66.   5.8、RMAN> delete copy 刪除所有映像副本;
  67.   5.9、RMAN> backup archivelog all delete input;
  68.   RMAN> backup backupset 22 format = ''d:backup%u.bak'' delete input在備份後刪除輸入物件;
  69.   5.10、RMAN> delete backupset id; 刪除備份集

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