ITPUX技术网

交流 . 资讯 . 分享
Make progress together!
Oracle数据库DBA高级工程师培训视频
Oracle数据库培训-备份恢复-性能优化-集群容灾
mysql数据库视频教程

异地迁移Rman脚本

内容发布:yim100| 发布时间:2014-9-19 20:56:27
[url=]主库备份:[/url]
[url=]run
{
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
backup full tag 'dbfull' format '备份地址‘
include current controlfile;
sql 'alter system archive log current';
release channel c1;
release channel c2;
release channel c3;
}
ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK;
CROSSCHECK BACKUPSET;
DELETE NOPROMPT OBSOLETE;[/url]



导地恢复:
rman target /

RMSN>[url=]set dbid xx;    (select dbid from v$database)[/url]

RMAN> startup nomount pfile='xx';

RMAN> restore controlfile from 'xx';(最小的备份集)

RMAN> alter database mount;

RMAN> catalog start  with 'xx';


RMAN> restore database;
这一步完成之后就停止旧库的监听器

[url=]RMAN>recover database until sequence 8503;(alter system archive log  current +1)[/url]

RMAN>alter database open resetlogs;



V$ARCHIVED_LOG


RMAN> sql 'alter session set nls_date_format="yyyy-mm-dd hh24:mi:ss"';



上一篇:IT忍者神龟之oracle存储过程中is和as区别描述
下一篇:[PL/SQL]IP与数字互转
回复

使用道具 举报

1框架
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表