Solved

Restore Oracle DB with RMAN

Posted on 2013-01-23
6
468 Views
Last Modified: 2013-02-08
Hi experts,
I've 2 Oracle instances:

ORCL1 on host1 (S.O. Windows 2003 32 bit - Oracle version 10g)
ORCL2 on host2 (S.O. Windows 2003 64 bit - Oracle version 10g)

I need backup ORCL2 and restore ORCL2 into ORCL1 (Duplicate the database ORCL2 to ORCL1)

I do not want to use EXPORT ORCL2 and IMPORT into ORCL1 but I have to use RMAN utility.

I knew I could use the RMAN command "DUPLICATE TARGET DATABASE TO ORCL1"

Could you tell me what steps should I take to restore ORCL2 into ORCL1 with RMAN

Could I have a problem with the machines 32 and 64 bit?

Thanks in advance!
0
Comment
Question by:ralph_rea
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 37

Expert Comment

by:Geert Gruwez
ID: 38810454
i think it won't work to restore on the 32bit
i have done the opposite, but not the downgrade from 64 to 32bit

only with export/import

you could restore orcl2 to orcl2 and then rename with nid
> nid is in bin directory
0
 
LVL 15

Expert Comment

by:Franck Pachot
ID: 38811619
Hi,
In theory, you can restore beween different word sizes because the files (controlfile, datafiles and redo) are not concerned by it.
However, you should recompile all objects afterwards as some compiled code can depend on word size.
Regards,
Franck.
0
 

Author Comment

by:ralph_rea
ID: 38812457
ok,
but Should I have problems also with tempfiles?

I'd also like to know what are the steps that I follow to backup and restore with RMAN
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:ralph_rea
ID: 38813937
I tried this:
BACKUP on ORCL2
rman target /
run {
allocate channel c1 device type disk;
allocate channel c2 device type disk;
backup as compressed backupset database include current controlfile format 'C:\backup\backup_%U';
backup as compressed backupset archivelog all format 'C:\backup\archive_%U';
}

RESTORE from ORCL2 on ORCL1
rman target sys/pwd@ORCL2 auxiliary /

run {
    allocate channel x1 device type disk;
    allocate channel x2 device type disk;
    allocate auxiliary channel y1 device type disk;
    allocate auxiliary channel y2 device type disk;
    set newname for datafile  1 to  'here_new_location\datafile1.DBF';
    set newname for datafile  2 to  'here_new_location\datafile2.DBF';
    set newname for datafile  3 to  'here_new_location\datafile3.DBF';
    set newname for tempfile 1 to  'here_new_location\tempfile1.DBF';
    set newname for tempfile 2 to  'here_new_location\tempfile2.DBF';
    DUPLICATE TARGET DATABASE TO ORCL1
    LOGFILE
        GROUP  1 ( 'C:\REDOLOG\REDO01X.LOG', 'C:\REDOLOG\REDO01Y.LOG') SIZE 200M,
        GROUP  2 ( 'C:\REDOLOG\REDO02X.LOG', 'C:\REDOLOG\REDO02Y.LOG') SIZE 200M,
        GROUP  3 ( 'C:\REDOLOG\REDO03X.LOG', 'C:\REDOLOG\REDO03Y.LOG') SIZE 200M,
    release channel x1;
    release channel x2;
    release channel y1;
    release channel y2;
 }
 
 But Now I have all objects invalid and I cannot see tempfiles.
 
 What I wrong?
0
 
LVL 37

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 200 total points
ID: 38817723
create tempfiles on the new database afterwards

try using the db_file_name_convert parameter in your init file
db_file_name_convert=(old_location, new_location)
also possible for log_file_name_convert
0
 
LVL 15

Accepted Solution

by:
Franck Pachot earned 300 total points
ID: 38819063
Hi,
You should run the script ?/rdbms/admin/utlirp.sql to invalidate all objects and recompile all objects as you changed word size.
tempfiles are not restored, you can just create them.
Regards,
Franck.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question