1.配置网络参数(静态注册)
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=orcl)
(SID_NAME=orcl)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
)
2.设置密码文件
orapwd file=orapwclonedb password=myoracle
3.准备参数文件
4.建立相关文件夹
grep u01 initclonedb.ora
5.启动克隆库到nomount
6.RMAN 使用辅助的方式连接目标数据库,执行恢复
duplicate target database to "CLONEDB" nofilenamecheck
db_file_name_convert (‘/u01/app/oracle/oradata/orcl/‘,‘/u01/app/oracle/oradata/clonedb/‘)
logfile ‘/u01/app/oracle/oradata/clonedb/redo01.log‘ size 10m,
‘/u01/app/oracle/oradata/clonedb/redo02.log‘ size 10m
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/14/2015 21:48:29
RMAN-05556: not all datafiles have backups that can be recovered to SCN 2239519
RMAN-03015: error occurred in stored script Memory Script
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
解决方法 alter system switch logfile
alter system archive log current
原因是控制文件里没有记录备份的信息