您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
我们前面做了那么多的备份,我如何能通过RMAN查询到我所做过的操作呢?RMAN为我们提供了LIST命令。LIST命令可以显示备份集、代理copy、镜像copy的信息。
RMAN> list; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00558: error encountered while parsing input commands RMAN-01009: syntax error: found ";": expecting one of: "all, archivelog, backed, backuppiece, backupset, backup, completed, controlfilecopy, copy, datafilecopy, db_unique_name, device, expired, failure, foreign, global, incarnation, like, proxy, recoverable, restore, script, tag" RMAN-01007: at line 1 column 5 file: standard input
我们根据报错信息,可以知道list命令后面可以跟哪些参数。
比如列举出数据库做了哪些备份。
RMAN> LIST BACKUP;
数据库做了哪些镜像copy
RMAN> list copy; specification does not match any datafile copy in the repository specification does not match any control file copy in the repository specification does not match any archived log in the repository
总之list命令告诉我们已经做了什么。
REPORT命令
RMAN> report; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00558: error encountered while parsing input commands RMAN-01009: syntax error: found ";": expecting one of: "device, need, obsolete, schema, unrecoverable" RMAN-01007: at line 2 column 1 file: standard input
report need 告诉我们还需要做什么。
report obsolete 告诉我们哪些是废弃的。
DELETE 删除命令
RMAN> delete 2> ; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00558: error encountered while parsing input commands RMAN-01009: syntax error: found ";": expecting one of: "archivelog, backuppiece, backupset, backup, controlfilecopy, copy, datafilecopy, expired, force, foreign, global, noprompt, obsolete, proxy, script" RMAN-01007: at line 2 column 1 file: standard input
删除特定备份集:
DELETE BACKUPSET 102;
不经确认而删除过期备份:
DELETE NOPROMPT EXPIRED BACKUP OF TABLESPACE users;
根据已配置的保留策略删除所有备份、副本和归档重做日志文件:
DELETE OBSOLETE;
CROSSCHECK命令
验证RMAN repository中的备份集、copy等文件在操作系统上是否存在。如果不存在,则该文件标示为EXPIRED;
RMAN> crosscheck; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00558: error encountered while parsing input commands RMAN-01009: syntax error: found ";": expecting one of: "archivelog, backuppiece, backupset, backup, controlfilecopy, copy, datafilecopy, foreign, proxy" RMAN-01007: at line 1 column 11 file: standard input
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。