这篇文章主要讲解了“RMAN常用命令汇总”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“RMAN常用命令汇总”吧!1.
默认配置show命令查看当前配置参数RMAN> show all;RMAN configuration parameters for database with db_unique_name ORCL are:CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # defaultCONFIGURE BACKUP OPTIMIZATION OFF; # defaultCONFIGURE DEFAULT DEVICE TYPE TO DISK; # defaultCONFIGURE CONTROLFILE AUTOBACKUP ON;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # defaultCONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # defaultCONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE MAXSETSIZE TO UNLIMITED; # defau免费云主机域名ltCONFIGURE ENCRYPTION FOR DATABASE OFF; # defaultCONFIGURE ENCRYPTION ALGORITHM ‘AES128’; # defaultCONFIGURE COMPRESSION ALGORITHM ‘BASIC’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE ; # defaultCONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # defaultCONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_orcl.f’; # default2.
列出备份信息-LIST命令(1)
列出数据库中所有备份信息RMAN> list backup;(2)
列出所有控制文件的备份信息RMAN> list backup of controlfile;(3)
列出指定数据文件的备份信息RMAN> list backup of datafile ‘/u01/backup/backup_users.dbf’;或者RMAN> list backup of datafile 3;注:DATAFILE序号可以通过动态性能视图V$DATAFILE或者数据字典DBA_DATA_FILES中查询。(4)
列出某个设备上所有信息RMAN> list device type disk backup;(5)
列出所有无效备份RMAN> list expired backup;3.
删除命令-DELETE命令(1)
删除过期备份RMAN> delete obsolete;(2)
删除无效备份删除无效备份需要首先执行CROSSCHECK命令核对备份集,如果发现备份无效(比如备份应对的数据文件损坏或丢失),RMAN会将该备份集标记为EXPIRED状态RMAN> delete expired backup;(3)
删除无效副本RMAN> delete expired copy;(4)
删除指定备份集RMAN> delete backupset 3;(5)
删除所有备份集RMAN> delete backup;(6)
删除所有影像副本RMAN> delete copy;(7)
备份后删除输入对象RMAN> delete archivelog all delete input;4.
报表显示-REPORT命令(1)
查看所有需要备份的文件RMAN> report need backup;(2)
查看指定表空间是否需要备份RMAN> report need backup tablespace users;(3)
查看过期备份RMAN> report obsolete;5.
执行检查-CROSSCHECK命令CROSSCHECK命令用来检查备份或归档物理文件的状态,如果物理文件真的存在,并且控制文件(或恢复目录)中有匹配记录,则标记该对象的状态为AVAILABLE(有效),如果文件已经不存在了,则标记该对象的状态为EXPIRED(无效)(1)
检查所有归档文件RMAN> crosscheck archivelog all;(2)
检查所有备份集RMAN> crosscheck backup;
感谢各位的阅读,以上就是“RMAN常用命令汇总”的内容了,经过本文的学习后,相信大家对RMAN常用命令汇总这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是百云,小编将为大家推送更多相关知识点的文章,欢迎关注!
节点 Cpu 内存 OS db01 8cores 16G Oracle Linux Server release 6.6 (x86_64) db02 8cores 16G Oracle Linux Server release 6.6 (x86_64) [ro…
免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。