RMAN
/*压缩备份*/
RUN {
ALLOCATE CHANNEL ch0 TYPE disk maxpiecesize 10G ;
BACKUP as compressed backupset DATABASE FORMAT='E:\BACKUP\%U' ;
BACKUP CURRENT CONTROLFILE;
SQL 'alter system switch logfile';
# backup archivelog time between 'sysdate-3' and 'sysdate';
RELEASE CHANNEL ch0;
}
/*还原控件文件*/
restore controlfile from 'E:\backup\C-2242568731-20080811-00'
/*还原数据文件到指定路径*/
RMAN> run{
allocate channel ch3 device type disk;
set newname for datafile 53 to 'E:\DF_1.DBF';
set newname for datafile 54 to 'E:\EC_5.DBF';
set newname for datafile 57 to 'F:\DC_2.DBF';
restore database;
switch datafile all;
release channel ch3;
}
阅读(795) | 评论(0) | 转发(0) |