RMAN命令小結(精簡命令)

season0891發表於2010-08-12
come from:http://publish.it168.com/2006/0217/20060217164601.shtml

  【IT168 伺服器學院使用RMAN進行備份和恢復的常用命令
  
  ===================
  連線到目標資料庫(不用恢復目錄資料庫)
  rman target / nocatalog
  
  顯示rman配置
  RMAN> show all;
  
  
  ====================
  報告目標資料庫的物理結構
  RMAN> report schema;
  
  報告陳舊備份
  RMAN> report obsolete;
  
  報告不可恢復的資料檔案
  RMAN> report unrecoverable;
  
  列出備份資訊
  RMAN> list backup;
  
  RMAN> list backup of database;
  
  RMAN> list backup of tablespace table_name;
  
  RMAN> list backup of controlfile;
  
  RMAN> list backup of spfile;
  
  RMAN> list backupset id;

  
  ========================
  校驗備份資訊:
  RMAN> crosscheck backup;
  
  RMAN> crosscheck backup of database;
  
  RMAN> crosscheck backup of tablespace system;
  
  RMAN> crosscheck backup of controlfile;
  
  RMAN> crosscheck backup of spfile;

  
  
  ========================
  刪除備份
  RMAN> delete obsolete; -- 刪除陳舊備份
  
  RMAN> delete expired backup;
  
  RMAN> delete backupset id;
  
  RMAN> delete backup;
-- 刪除所有備份
  
  
  =========================
  改變備份集的狀態
  RMAN> change backupset id unavailable; -- available
  改為長期備份
  RMAN> change backupset id keep forever logs;
  
  RMAN> change backupset id keep until time 'sysdate+60' logs;
  
  RMAN> change backupset id nokeep;
  

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