This discussion is archived
7 Replies Latest reply: May 4, 2012 8:21 AM by Hemant K Chitale RSS

recover full backup into another database

mnoscars Newbie
Currently Being Moderated
Hello,

I have a particular need that does not seems to be done so often and I just cannot get it.

So here is the situation : I have a backup of a full database. That means that I have the init parameter file, the autobackuped controlfile (+pfile) and the autobackuped backupset.
The source database is release 10.2.0.5.0, RAC instance.

On another server, I have a simple instance, same release and I would like to recover the full backup in the second database.

I have already done that once before but I had both pfile and controlfile backuped manually and the two instances were simple ones.

Here I have tried the same way : shutdown my target database, changing my pfile backup parameters to match the target database. Startup the target database in nomount mode using the pfile. Create spfile from pfile. Then restore controlfile from the backuped controlfile with rman.

But here this step is a problem.


My question is simple : what is the best way / good practices to get this working?


Thanks in advance for your help. Ask if you need any further informations.


Max
  • 1. Re: recover full backup into another database
    621100 Newbie
    Currently Being Moderated
    You can easily accomplish this using DUPLICATE DATABASE

    Read : http://oratin.blogspot.in/2011/02/
  • 2. Re: recover full backup into another database
    mnoscars Newbie
    Currently Being Moderated
    Hello,

    Thank you for your fast answer. I have already read about the duplicate functionnality but I do not think it can help me in that case (or maybe I have not understood it well).

    Tell me if I am wrong but the duplicate functionnality allows to clone a database using rman. For this, I will have to connect to both source and target databases using rman.

    In my case, I cannot connect to the source database. The client provided the backup files on a drive and I do not have access to the internal network where the source database is located. So I just have the source backup files and the new database.

    Max
  • 3. Re: recover full backup into another database
    user503699 Expert
    Currently Being Moderated
    mnoscars wrote:
    Here I have tried the same way : shutdown my target database, changing my pfile backup parameters to match the target database. Startup the target database in nomount mode using the pfile. Create spfile from pfile. Then restore controlfile from the backuped controlfile with rman.

    But here this step is a problem.
    What is the problem? Do you get any error message?
  • 4. Re: recover full backup into another database
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    But here this step is a problem
    Without knowing the actual commands you tried and the error ("problem") returned by Oracle, we really can't help you.

    When you did a STARTUP NOMOUNT, did you confirm that all the parameters (including DB_NAME !!) in the pfile were correct for the database being restored ?


    Hemant K Chitale
  • 5. Re: recover full backup into another database
    mnoscars Newbie
    Currently Being Moderated
    Hello,

    Here is the original init pfile content :


    instdb1.__db_cache_size=1107296256
    instdb2.__db_cache_size=1023410176
    instdb2.__java_pool_size=16777216
    instdb1.__java_pool_size=16777216
    instdb2.__large_pool_size=16777216
    instdb1.__large_pool_size=16777216
    instdb1.__shared_pool_size=436207616
    instdb2.__shared_pool_size=520093696
    instdb2.__streams_pool_size=16777216
    instdb1.__streams_pool_size=16777216
    *.audit_trail='DB'
    *.background_dump_dest='/u1/app/oracle/admin/instdb/bdump'
    *.cluster_database_instances=2
    *.cluster_database=TRUE
    *.compatible='10.2.0.0.0'
    *.control_file_record_keep_time=95
    *.control_files='+DG_DATA/instdb/controlfile/backup.305.615208725','+DG_FLASH/instdb/controlfile/current.256.614223119'
    *.core_dump_dest='/u1/app/oracle/admin/instdb/cdump'
    *.db_block_size=8192
    *.db_create_file_dest='+DG_DATA'
    *.db_create_online_log_dest_1='+DG_FLASH'
    *.db_domain='inst.xx'
    *.db_file_multiblock_read_count=16
    *.db_flashback_retention_target=1440
    *.db_name='inst'
    *.db_recovery_file_dest='+DG_DATA'
    *.db_recovery_file_dest_size=53687091200
    instdb1.instance_number=1
    instdb2.instance_number=2
    *.job_queue_processes=10
    instdb1.local_listener='LISTENER_INST1.INST.XX'
    instdb2.local_listener='LISTENER_INST2.INST.XX'
    instdb1.log_archive_dest_1='LOCATION=/u1/app/oracle/admin/inst/arch_orainst1'
    instdb2.log_archive_dest_1='LOCATION=/u1/app/oracle/admin/inst/arch_orainst2'
    *.log_archive_dest_2='SERVICE=INSTB.INST.XX VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) OPTIONAL LGWR ASYNC NOAFFIRM NET_TIMEOUT=10'
    *.log_archive_dest_state_2='ENABLE'
    *.log_archive_format='inst_%t_%s_%r.arc'
    *.max_dump_file_size='200000'
    *.open_cursors=300
    *.parallel_max_servers=20
    *.pga_aggregate_target=824180736
    *.processes=550
    instdb1.remote_listener='LISTENER_INST1.INST.XX'
    instdb2.remote_listener='LISTENER_INST2.INST.XX'
    *.remote_login_passwordfile='EXCLUSIVE'
    *.resource_limit=TRUE
    *.session_max_open_files=20
    *.sessions=480
    *.sga_target=1610612736
    instdb1.thread=1
    instdb2.thread=2
    *.undo_management='AUTO'
    instdb1.undo_tablespace='UNDOTBS1'
    instdb2.undo_tablespace='UNDOTBS2'
    *.user_dump_dest='/u1/app/oracle/admin/inst/udump'


    And here is the test I have done :

    *1. modified the init pfile to this :*

    inst.__db_cache_size=1107296256
    inst.__java_pool_size=16777216
    inst.__large_pool_size=16777216
    inst.__shared_pool_size=436207616
    inst.__streams_pool_size=16777216
    *.audit_trail='DB'
    *.background_dump_dest='C:\Oracle\admin\inst\bdump'
    *.compatible='10.2.0.5.0'
    *.control_file_record_keep_time=95
    *.control_files='C:\Oracle\oradata\inst\control01.ctl','C:\Oracle\oradata\inst\control02.ctl','C:\Oracle\oradata\inst\control03.ctl'
    *.core_dump_dest='C:\Oracle\admin\inst\cdump'
    *.db_block_size=8192
    *.db_create_file_dest='C:\Oracle\oradata\inst'
    *.db_create_online_log_dest_1='C:\Oracle\inst'
    *.db_domain=''
    *.db_file_multiblock_read_count=16
    *.db_flashback_retention_target=1440
    *.db_name='inst'
    *.db_recovery_file_dest='C:\Oracle\oradata'
    *.db_recovery_file_dest_size=53687091200
    *.job_queue_processes=10
    inst.log_archive_dest_1='LOCATION=C:\Oracle\oradata'
    *.log_archive_dest_state_2='ENABLE'
    *.log_archive_format='inst_%t_%s_%r.arc'
    *.max_dump_file_size='200000'
    *.open_cursors=300
    *.parallel_max_servers=20
    *.pga_aggregate_target=824180736
    *.processes=550
    *.remote_login_passwordfile='EXCLUSIVE'
    *.resource_limit=TRUE
    *.session_max_open_files=20
    *.sessions=480
    *.sga_target=1610612736
    inst.thread=1
    *.undo_management='AUTO'
    inst.undo_tablespace='UNDOTBS1'
    *.user_dump_dest='C:\Oracle\admin\inst\udump'




    *2. shutdown the database, startup in nomount and restore controlfile (with the error when trying to restore controlfile) :*


    RMAN> shutdown immediate;

    Oracle instance shut down

    RMAN> startup nomount pfile='C:\Oracle\init\initInst.ora';

    connected to target database (not started)
    Oracle instance started

    Total System Global Area 1610612736 bytes

    Fixed Size 1305856 bytes
    Variable Size 369099520 bytes
    Database Buffers 1233125376 bytes
    Redo Buffers 7081984 bytes

    RMAN> restore controlfile from 'C:\Oracle\ctl\inst_ctrl_c-2972284490-20120318-00';

    Starting restore at 04-MAY-12
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=596 devtype=DISK

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 05/04/2012 14:20:12
    RMAN-06172: no autobackup found or specified handle is not a valid copy or piece





    Thank you for your help.

    Max
  • 6. Re: recover full backup into another database
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    C:\Oracle\ctl\inst_ctrl_c-2972284490-20120318-00
    How have you verified that this is a valid controlfile backup ? From the RMAN log at the source ? How has this backuppiece been transferred to the new server ? Is it a transfer via Windows network file shares or via some other method ?


    Hemant K Chitale
  • 7. Re: recover full backup into another database
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    Your source is Unix/Linux.
    Your new server is Windows.

    Are you sure that transferring files between the two platforms is valid ? You are doing a cross-platform restore.


    Hemant K Chitale

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points