码迷,mamicode.com
首页 > 数据库 > 详细

使用RMAN来克隆数据库

时间:2015-09-15 01:46:47      阅读:274      评论:0      收藏:0      [点我收藏+]

标签:rman

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

原因是控制文件里没有记录备份的信息

使用RMAN来克隆数据库

标签:rman

原文地址:http://a1267078.blog.51cto.com/7900016/1694734

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!