• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 501
  • Last Modified:

Restore Oracle DB with RMAN

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
ralph_rea
Asked:
ralph_rea
  • 2
  • 2
  • 2
2 Solutions
 
Geert GruwezOracle dbaCommented:
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
 
Franck PachotCommented:
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
 
ralph_reaAuthor Commented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ralph_reaAuthor Commented:
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
 
Geert GruwezOracle dbaCommented:
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
 
Franck PachotCommented:
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now