设为首页 加入收藏

TOP

Oracle 11gR2利用RMAN复制整库记录(二)
2015-08-31 20:00:18 来源: 作者: 【 】 浏览:244
Tags:Oracle 11gR2 利用 RMAN 复制 记录
admin/testhis_n/adump
?[oracle@Oracle_archive ~]$ mkdir -p /u01/app/oracle/oradata/testhis_n/
?[oracle@Oracle_archive ~]$ mkdir -p /u01/app/oracle/fast_recovery_area/testhis_n/


登入数据库创建spfile并启动实例


[oracle@Oracle_archive ~]$ echo $ORACLE_SID
?testhisnew
?[oracle@Oracle_archive ~]$ sqlplus / as sysdba


?SQL*Plus: Release 11.2.0.2.0 Production on Tue Jul 28 16:14:04 2015


?Copyright (c) 1982, 2010, Oracle.? All rights reserved.


?Connected to an idle instance.


?SQL> create spfile from pfile='/home/oracle/pfile.ora';


?File created.


SQL> startup nomount;


ORACLE instance started.


Total System Global Area 3874926592 bytes


Fixed Size? ? ? ? ? ? ? ? ? 2232368 bytes


Variable Size? ? ? ? ? ? 2936016848 bytes


Database Buffers? ? ? ? ? 922746880 bytes


Redo Buffers? ? ? ? ? ? ? 13930496 bytes


源端登入两数据库,执行复制


[oracle@154-Oracle_Archive admin]$ rman target sys/******@testhis.154 auxiliary sys/******@testhis.11


?Recovery Manager: Release 11.2.0.2.0 - Production on Tue Jul 28 17:46:30 2015


?Copyright (c) 1982, 2009, Oracle and/or its affiliates.? All rights reserved.


?connected to target database: TESTHIS (DBID=1362777844)
?connected to auxiliary database: TESTHISNE (not mounted)


?RMAN> duplicate target database to testhisne from active database nofilenamecheck;


.


.


.


datafile 32 switched to datafile copy


input datafile copy RECID=31 STAMP=886273519 file name=/u01/app/oracle/oradata/testhisnew/test27.dbf


datafile 33 switched to datafile copy


input datafile copy RECID=32 STAMP=886273519 file name=/u01/app/oracle/oradata/testhisnew/testdeltable01.dbf


contents of Memory Script:


{


? Alter clone database open resetlogs;


}


executing Memory Script


database opened


Finished Duplicate Db at 28-JUL-15


.


复制完成后启动关闭目标库,验证是否复制成功,并观察alter日志是否有报错日志,确认无误后及时做全库备份。


--------------------------------------推荐阅读 --------------------------------------


--------------------------------------分割线 --------------------------------------


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Redis中关于过期键的删除策略 下一篇对MySQL event的相关理解

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: