Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1100298
  • 博文数量: 276
  • 博客积分: 10077
  • 博客等级: 上将
  • 技术积分: 2513
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-24 20:31
文章分类

全部博文(276)

文章存档

2020年(1)

2015年(5)

2012年(2)

2011年(6)

2010年(7)

2009年(224)

2008年(31)

我的朋友

分类: Oracle

2009-07-21 09:52:24

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;
}
阅读(763) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~