Solved

Restore Oracle DB with RMAN

Posted on 2013-01-23
6
442 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
  • 2
  • 2
  • 2
6 Comments
 
LVL 36

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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 36

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now