开源中文网

您的位置: 首页 > 数据库应用 > Oracle > 正文

使用RMAN进行备份和恢复的常用命令介绍

来源:  作者:

使用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;

Tags: RMAN 进行备份 恢复
关于开源中文网 - 联系我们 - 广告服务 - 网站地图 - 版权声明