Join the supporters of the Stop Global Warming Virtual March
Main Menu
HomeBasicsFusionPS on LinuxSecurityDocumentsScriptsSearchRSS FeedsWeb LinksSiteMapDiscussion ForumPodCastsGuest BookPeopleSoft Jobs
Translation
Translation may not be accurate.
** Thanks to Google Anyway***


To Change between languages
go to English and change again.
Login Form





Lost Password?
No account yet? Register
FeedBurner
Get Postings by Email
without Account.


Who's Online
We have 107 guests online
Statistics
Postings: 70
PeopleSoft Blog Feeds: 15
PeopleSoft Job Feeds: 16
Oracle Feeds: 12

Registered Members: 429
Unique Visitors: 891290
Syndicate
Home arrow Basics arrow Simple RMAN - CONTROL FILE Restore in different server
Simple RMAN - CONTROL FILE Restore in different server PDF Print E-mail
Written by RD   
Tuesday, 12 February 2008
Article Index
Simple RMAN - CONTROL FILE Restore in different server
Page 2

Copy  RMAN backup files including archive log backup files to the target server

Copy the SNAPSHOT CONTROL FILE or backed up control file from source server to target server.

If you do not remember the snapshot control file location, connect to source rman and query “snapshot controlfile name” and it will give as below: 

Source Server: 

RMAN> connect target /;
connected to target database: HRDMO (DBID=209403493034)

RMAN> show SNAPSHOT CONTROLFILE NAME;
using target database control file instead of recovery catalog
RMAN configuration parameters are:
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/10g/dbs/snapcf_HRDMO.f'; # default

Copy the snapshot controlfile to your target server or the backup of control file.

NOTE: You need to have same directories created for the restoration of files and the RMAN backup files, including archive log backup and they should be in the same structure as it is in source server. If you don’t have exactly same file system just create soft links to cheat. 

Target Server:

Export ORACLE_SID=HRDMO
RMAN

RMAN>startup nomount;
RMAN> set DBID=209403493034;
executing command: SET DBID
RMAN> restore controlfile from '/opt/oracle/standby/dbs/snapcf_crmprod.f'; # The location where you have it in target srvr.

Starting restore at 06-FEB-08 using channel ORA_DISK_1
channel ORA_DISK_1: copied controlfile copy
replicating controlfile
input filename=/db1/oradata/HRDMO/control01.ctl
output filename=/db2/oradata/HRDMO/control02.ctl
output filename=/db3/oradata/HRDMO/control03.ctl

Finished restore at 06-FEB-08

RMAN>alter database mount;
RMAN> run
2> {
3> sql 'alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"';
4> set until time '2008-01-31 01:00:00';
5> restore database;
6> recover database;
7> } 

RMAN>alter database open resetlogs; 

You have the copy of instance in the target server. 

Try it out and if you have any issues, comment here we can fix it.


Add as favourites (45) | Quote this article on your site | Views: 9994 | Print

Comments (12)
RSS comments
1. 02-20-2008 16:52
 
Is there a script that you can share to clone database using RMAN backup? 
 
Thanks in advance
Guest
 
Kumar G
2. 02-21-2008 21:42
 
Sure. I will put together a post to clone with RMAN.
Registered
 
RD
3. 03-03-2008 13:40
 
how do i specify what time to set for set until time  
 
set until time '2008-01-31 01:00:00';
Guest
 
ma
4. 03-06-2008 17:06
 
It depends on the business requirement. If you are cloning to a particular time after a specific process is run and before the next day process, then you can select time depending upon the processes scheduled in your system. 
 
For example, in case of HR databases, I make sure I specify the set in time after all the nightly processes are completed and before the next day transactions, mainly from the users are entered. Usually it is after 2 AM and before 6 AM of next day as most of the batch processes end by 2 AM and the first users’ login around 6 AM.
Registered
 
RD
5. 03-09-2008 20:19
 
i backed up using 
run 

allocate channel disk1 device type disk format '/xx/xx/backup/%u' 
allocate channel disk1 device type disk format  

 
NOW, 
HOW DO I RESTTORE FROM THE ABOVE LOCATION INTO A DATABASE 
1. THAT IS ALEADY POPULATED. 
 
AM I PLEASE ABLE TO GET THE STEPS ONE BY ONE PLEASE.
Guest
 
ma
6. 03-10-2008 20:41
 
Yes. You should be able to restore it once you have the file structure exactly same as you backed up in your source server in the target server also. Like '/xx/xx/backup/%u'. The format and the locations are stored in the control file of the database. So you should be able to restore. If it is already restored, then you may rename the folder and create a new folder with the same name, so that the already restored files are not disturbed.
Registered
 
RD
7. 06-25-2008 10:20
 
How can I restore in a whole DB from a server using ASM directories to a different server using regular filesystem? 
 
Thanks.
Guest
 
Jorge
8. 08-21-2008 09:33
 
You should have same file system and directory structure in standby box exactly like the production box. Then it is the same as other restoration as the database will look for the file systems like in production after restore. While restoring the controlfile you need to provide the full path of the snapshot control file backup. That is it.
Registered
 
RD
9. 12-09-2009 13:58
 
If I want to clone the database with different SID what do I do?
Guest
 
Dinesh
10. 12-09-2009 14:34
 
You can do all the above and shutdown and delete control files and recreate it with trace file.  
 
Note you need to rest logs before using it. Which means you can not apply further logs from production database. 
 
Cheers.
Registered
 
RD


Last Updated ( Monday, 28 July 2008 )
 
< Prev   Next >

xkcd and whatever..?

© 2010 PSADMIN.org
PSAdmin.org is for & by the PeopleSoft Administrators to share their Experience.