Oracle 11gR2利用RMAN复制整库记录(2)

[oracle@Oracle_archive ~]$ mkdir -p /u01/app/oracle/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日志是否有报错日志,确认无误后及时做全库备份。

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

RMAN备份时遭遇ORA-19571 

RMAN 配置归档日志删除策略

Oracle基础教程之通过RMAN复制数据库

RMAN备份策略制定参考内容

RMAN备份学习笔记

Oracle数据库备份加密 RMAN加密

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

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/79120b2354dc107d5da7264e9dd5288c.html