LIST
1、列出数据文件备份集
RMAN>list backup of database ;
RMAN>list backup of tablespace users;
RMAN>list backup of datafile 4;
2、列出控制文件备份集
RMAN>list backup of controlfile ;
3、列出归档日志备份集
RMAN>list backup of archivelog all;
4、列出SPFILE备份集
RMAN>list backup of spfile ;
5、列出数据文件映像副本
RMAN>list copy of database;
RMAN>list copy of tablespace users;
RMAN>list copy of datafile 4;
6、列出控制文件映像副本
RMAN>list copy of controlfile;
7、列出归档日志映像副本
RMAN>list copy of archivelog all;
8、列出数据库副本
RMAN>list incarnation of database ;
注意,每次用RESETLOGS选项打开数据库之后都会生成一个新的数据库副本。
9、列出备份集文件的信息
RMAN>list backupset 100;
CROSSCHECK
1、核对所有备份集
RMAN>crosscheck backup;
2、核对所有数据文件的备份集
RMAN>crosscheck backup of database ;
3、核对特定表空间的备
RMAN>crosscheck backup of tablespace system;
4、核对特定数据文件的备份集
RMAN>crosscheck backup of datafile 1;
5、核对控制文件的备份集
RMAN>crosscheck backup of controlfile ;
6、核对SPFILE的备份集
RMAN> crosscheck backup of spfile;
7、核对归档日志的备份集
RMAN> crosscheck backup of archivelog sequence 40;
8、核对所有映像副本
RMAN> crosscheck copy ;
9、核对所有数据文件的映像副本
RMAN> crosscheck copy of database;
10、核对特定表空间的映像副本
RMAN> crosscheck copy of tablespace users;
11、核对特定数据文件的映像副本
RMAN> crosscheck copy of datafile 1;
12、核对控制文件的映像副本
RMAN> crosscheck copy of controlfile;
13、核对归档日志的映像副本
RMAN> crosscheck copy of archivelog sequence 44;
DELETE
1、删除陈旧备份
delete obsolete; #提示
delete noprompt obsolete; #不提示
2、删除EXPIRED备份集
delete noprompt expired backup;
3、删除EXPIRED副本
delete noprompt expired copy ;
4、删除特定备份集
delete noprompt backupset 19;
5、删除特定备份片
delete noprompt backuppiece 'c:testdemo1.bak';
6、删除所有备份集
delete noprompt backup ; 或者
delete noprompt backupset;
7、删除特定映像副本
delete noprompt datafilecopy 'c:testdemo.bak'; 删除数据文件
delete noprompt controlfilecopy 'c:testcontrolfile_bak.ctl'; 删除控制文件
delete noprompt archivelog 'c:testarc.bak'; 删除归档日志
8、删除所有映像副本
delete noprompt copy;
9、在备份后删除输入对象
backup archivelog all delete input ;
backup backupset 22 format='c:test%u.bak' delete input ;
CHANGE
1、改变备份集状态
change backupset 22 unavailable;
2、改变映像副本状态
change datafilecopy 'c:demo.bak' unavailable ;
change controlfilecopy 'c:demo.bak' unavailable ;
change archivelog 'c:demo.bak' unavailable ;
3、建立长期备份
change backupset 100 keep forver logs; 使备份集100永久保留
change backupset 100 keep until time 'sysdate+60' logs; 使备份集100保留60天
change backupset 156 nokeep ; 免除备份集100的保留期限
CATALOG
1、注册副本
catalog datafilecopy 'c:\user01.bak';
2、注册备份片
catalog backuppiece 'c:demo_10.dbf' ;
3、注册特定目录的所有备份文件
catalog start with 'c:bak';
4、注销备份记录
change datafilecopy 'c:\user01.bak' uncatalog;
change controlfilecopy 'c:demo.ctl' uncatalog;
change backuppiece 'c:demo_10.bak' uncatalog;
delete noprompt archivelog until time "to_date('XXXX-XX-XX','YYYY-MM-DD')"; ---> 清理到某天日期之前的归档
delete noprompt archivelog until time "to_date('2016-09-14 18:00:00','YYYY-MM-DD hh24:mi:ss')"; ---> 清理到具体时分秒之前的归档日志
cross check archivelog all; --->校验日志的可用性
list expired archivelog all; --->列出所有失效的归档日志
delete archivelog until sequence 16; --->删除log sequence为16及16之前的所有归档日志
delete archivelog all completed before 'sysdate-7'; --->删除系统时间7天以前的归档日志,不会删除闪回区有效的归档日志
delete archivelog all completed before 'sysdate - 1'; --->同上,1天以前的
delete archivelog from time 'sysdate-1'; --->注意这个命令,删除系统时间1天以内到现在的归档日志
delete noprompt archivelog all completed before 'sysdate'; --->该命令清除当前所有的归档日志
delete noprompt archivelog all completed before 'sysdate-0'; --->该命令清除当前所有的归档日志
delete noprompt archivelog all; --->同上一命令