时间:2021-07-01 10:21:17 帮助过:15人阅读
Oracle Rman 命令详解(List report backup configure)
Oracle Rman 命令详解(List report backup configure)
[日期:2011-09-11] 来源:Linux社区 作者:tianlesoftware [字体:]
list incarnation;
list backup summary;
list backup of database summary;
list backup of tablespace summary;
list backup of datafile n,n summary;
list archivelog all summary;
list backup by file;
list backup;
list expired backup;
list copy;
list backup of spfile;
list backup of controlfile;
list backup datafile n,n,n;
list backup tablespace tablespace_name;
list backup of archivelog all;
list backup of archivelog from scn ...;
list backup of archivelog until scn ...;
list backup of archivelog from sequence ..;
list backup of archivelog until time 'sysdate-10';
list backup of archivelog {all, from, high, like, logseq, low, scn, sequence, time, until};
所备份的数据库:
list copy of database;
list copy of controlfile;
list copy of tablespace users;
list copy of datafile n,n,n;
list copy of archivelog all;
list copy of archivelog from scn 10000;
list copy of archivelog until sequence 12;
list backup of spfile;
list backup of archivelog {all, from, high, like, logseq, low, scn, sequence, time, until};
list backup of archivelog all;
list backup of archivelog until time 'sysdate-1';
list backup of archivelog from sequence 10;
list backup of archivelog until sequence 10;
list backup of archivelog from scn 10000;
list backup of archivelog until scn 200000;
list archivelog from scn 1000;
list archivelog until scn 2000;
list archivelog from sequence 10;
list archivelog until sequence 12;
二、report常用命令总结备忘
即没有这个数据文件的备份、或者该数据文件的备份已经过期)
备份控制文件
backup database device type disk includ current controlfile;
四、configure常用命令总结备忘
4.1 显示当前的配置信息
1.1 RMAN> show all;
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'D:/Oracle/PRODUCT/10.2.0/DB_1/DATABASE/S
NCFDBA.ORA'; # default
4.2. 常用的configure选项
4.2.1保存策略 (retention policy)
configure retention policy to recovery window of 7 days;
configure retention policy to redundancy 5;
configure retention policy clear;
4.3.4控制文件 controlfile
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to '/cfs01/backup/conf/conf_%F';
configure controlfile autobackup clear;
configrue controlfile autobackup format for device type disk clear;
configrue snapshot controlfile name to '/cfs01/backup/snapcf/scontrofile.snp';
用于清除上面的信道配置
configure channel device type disk format 'e/:rmanback_%U';
configure channel device type disk maxpiecesize 100m
configure channel device type disk rate 1200K
configure channel 1 device type disk format 'e/:rmanback_%U';
configure channel 2 device type disk format 'e/:rmanback_%U';
configure channel 1 device type disk maxpiecesize 100m
配置数据库设备类型的并行度。
4.3.6生成备份副本 datafile|archivelog backup copies
configure datafile backup copies for device type disk|stb to 3;
configure archivelog backup copies for device type disk|stb to 3;
4.3.7排除选项 exclude
configure exclude for tablespace 'users';
configrue exclude clear;
CONFIGURE AUXNAME FOR DATAFILE 1 TO '/oracle/auxfiles/aux_1.f';
CONFIGURE AUXNAME FOR DATAFILE 2 TO '/oracle/auxfiles/aux_2.f';
CONFIGURE AUXNAME FOR DATAFILE 3 TO '/oracle/auxfiles/aux_3.f';
CONFIGURE AUXNAME FOR DATAFILE 4 TO '/oracle/auxfiles/aux_4.f';
-
CONFIGURE AUXNAME FOR DATAFILE 1 CLEAR;
CONFIGURE AUXNAME FOR DATAFILE 2 CLEAR;
CONFIGURE AUXNAME FOR DATAFILE 3 CLEAR;
CONFIGURE AUXNAME FOR DATAFILE 4 CLEAR;
,