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日志是否有报错日志,确认无误后及时做全库备份。
--------------------------------------推荐阅读 --------------------------------------
--------------------------------------分割线 --------------------------------------