Duplicate Database With RMAN Without Connecting To Target Database [ID 732624.1]

Duplicate Database With RMAN Without Connecting To Target Database [ID 732624.1]

 Modified 01-FEB-2011     Type HOWTO     Status MODERATED 

In this Document
  Goal
  Solution
  References


Platforms: 1-914CU;

 

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

 

 

Applies to:

Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.1.0.7 - Release: 10.1 to 11.1
Information in this document applies to any platform.
***Checked for relevance on 01-Feb-2011***

Goal

How to do duplicate database without connecting to target database using backups taken from RMAN on alternate host.

Solution

Follow the below steps
1)Export ORACLE_SID=<SID Name as of production>

create init.ora file and give db_name=<dbname of production> and control_files=<location where you
want controlfile to be restored>

2)Startup nomount pfile=<path of init.ora>;

3)Connect to RMAN and issue command :

RMAN>restore controlfile from '<backuppiece of controlfile which you took on production>;

controlfile should be restored.

4) Issue "alter database mount"

Make sure that backuppieces are on the same location where it were there on production db. If you
dont have the same location, then make RMAN aware of the changed location using "catalog" command.

RMAN>catalog backuppiece <piece name and path>;

If there are more backuppieces, than they can be cataloged using command :

RMAN>catalog start with <path where backuppieces are stored>;

5) After catalogging backuppiece, issue "restore database" command. If you need to restore datafiles to a location different to the one recorded in controlfile, use SET NEWNAME command as below:

run {
set newname for datafile 1 to '/newLocation/system.dbf';
set newname for datafile 2 to '/newLocation/undotbs.dbf';
...
restore database;
switch datafile all; }

 


6) After database is restored, perform recovery and apply archives which were generated during
backup using RMAN and then open the database with resetlogs. If you need to create online redo logs in a different location to that recorded in controlfile (v$logfile.member) run below rename commands for all redologs before running ALTER DATABASE OPEN RESETLOGS:

SQL> alter database rename file '/oldLocation/redo01.log' to '/newLocation/redo01.log';

7) To change the dbname and dbid, please use the Note 224266.1 to change the same

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值