RMAN常用命令
RMAN常用命令
rman常用命令crosscheckreportobsolete
1、SHOW命令: 1.1、RMAN> show all; 显示rman参数配置 2、REPORT命令: 2.1、RMAN> report schema 报告目标数据库的物理结构 2.2、RMAN>report need backup days=n; 报告最近n天没有被备份的数据文件 2.3、RMAN> report need backup days n tablespace [name]; 在[name]表空间上n天未备份的数据文件 2.4、RMAN> report need backup incremental n; 报告恢复数据文件需要的增量备份个数超过n次的数据文件 2.5、RMAN> report need backup redundancy n database; 报告备份文件低于n份的所有数据文件 RMAN>report need backup redundancy=n; 2.6、RMAN> report need backup recovery window of n days; 报告文件报表的恢复需要超过n天的归档日志的数据文件 2.7、RMAN> report unrecoverable; 报告数据库所有不可恢复的数据文件 2.8、RMAN> report obsolete redunndancy n; 报告备份次数超过n次的陈旧备份 2.9、RMAN>report obsolete; 报告多余的备份 3、LIST命令:列出备份信息 3.1、列出数据文件备份集 RMAN>list backup 列出详细备份 RMAN>list expired backup 列出过期备份 RMAN> list backup of database; 列出所有数据文件的备份集 RMAN> list backup of tablespace [name]; 列出特定表空间的所有数据文件备份集 3.2、RMAN> list backup of controlfile 列出控制文件备份集 3.3、RMAN> list backup of archivelog all 列出归档日志备份集详细信息 RMAN>list archivelog all; 列出归档日志备份集简要信息 3.4、RMAN> list backup of spfile 列出SPFILE备份集 3.5、RMAN> list copy of datafile [file#] 列出数据文件映像副本 3.6、RMAN> list copy of controlfile 列出控制文件映像副本 3.7、RMAN> list copy of archivelog all 列出归档日志映像副本 3.8、RMAN> list incarnation of database 列出对应物/列出数据库副本 3.9、RMAN>list backup summary; 概述可用的备份 B表示backup F表示FULL A表示archive log 0 1表示增量备份的级别 S说明备份状态(A表示AVAILABLE、X表示EXPIRED) 3.10、RMAN>list backup by file 按备份的文件类型列出备份(数据文件,归档日志,控制文件,服务器参数文件) 4、CROSSCHECK命令:校验备份信息 4.1、RMAN> crosscheck backup 核对所有备份集 4.2、RMAN> crosscheck backup of database 核对所有数据文件的备份集 4.3、RMAN> crosscheck backup of tablespace [name] 核对特定表空间的备份集 4.4、RMAN> crosscheck backup of datafile [file#] 核对特定数据文件的备份集 4.5、RMAN> crosscheck backup of controlfile 核对控制文件的备份集 4.6、RMAN> crosscheck backup of spfile 核对SPFILE的备份集 4.7、RMAN> crosscheck backup of archivelog sequence [Seq] 核对特定归档日志的备份集 4.8、RMAN> crosscheck backup tag=[Tag]; 核对特定备份集 4.9、RMAN> crosscheck backup completed after [Completion] 核定特定时间完成的备份集 RMAN> crosscheck backup completed between [Completion] and [Completion] 4.10、RMAN> crosscheck archivelog all; 核对所有归档日志的备份集 4.11、RMAN> crosscheck archivelog like '%archivename' 核对特定归档日志的备份集 4.12、RMAN> crosscheck archivelog from sequence [Seq]; 4.13、RMAN> crosscheck archivelog until sequence [Seq]; 4.14、RMAN> crosscheck backuppiece [BP Key]; 核对特定备份片 RMAN> crosscheck backuppiece [Piece Name]; 4.15、RMAN> crosscheck copy 核对所有映像副本 4.16、RMAN> crosscheck copy of database 核对所有数据文件的映像副本 4.17、RMAN> crosscheck copy of tablespace [name] 核对特定表空间的映像副本 4.18、RMAN> crosscheck copy of datafile [file#] 核对特定数据文件的映像副本 4.19、RMAN> crosscheck copy of archivelog sequence [Seq] 核对归档日志的映像副本 4.20、RMAN> crosscheck copy of controlfile 核对控制文件的映像副本 5、DELETE:删除备份 5.1、RMAN> delete obsolete; 删除陈旧备份 5.2、RMAN> delete expired backup; 删除EXPIRED备份 5.3、RMAN> backup archivelog all delete input; 在备份后删除输入对象 5.4、RMAN> delete backupset [BP Key]; 删除特定备份集 5.5、RMAN> delete backuppiece [Piece Name] 删除特定备份片 5.6、RMAN> delete backup 删除所有备份集 5.7、RMAN> delete datafilecopy [path] 删除特定映像副本 5.8、RMAN> delete copy 删除所有映像副本