Solved

Restore Oracle DB with RMAN

Posted on 2013-01-23
6
456 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 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
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

831 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