Steps to restore RMAN backup to different host, for example, RMAN backup from Production server to Test server.
Presumptions
    * Production database: Server A.
    * Standby and RMAN database: Server B.
    * Test database: Server C
    * tnsnames.ora
    TEST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = test.unicon.com)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = test)
    (SERVER = DEDICATED)
    )
    )
    RMAN =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = stb.unicon.com)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = rman)
    (SERVER = DEDICATED)
    )
    )
    PRO =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = prod.unicon.com)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = prod)
    (SERVER = DEDICATED)
    )
    )
    STB =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = stb.unicon.com)(PORT = 1521))
    )
    (CONNECT_DATA =
    (SID = stb)
    (SERVER = DEDICATED)
    )
    )
    * All servers have identifical directory structure.
1, Copy backup control file and init.ora file from Prod to Test.
2, Start Test server.
    sqlplus /nolog
    SQL>connect sys/linux@test as sysdba
    SQL> startup nomount PFILE=’D:\Oracle\admin\pfile\init.ora’;
   
  
3. Copy RMAN backup files from Prod to Test, place them in the same directory as Prod.
4. Connect to RMAN
    rman TARGET SYS/oracle@PROD CATALOG rman/rman@rman AUXILIARY SYS/linux@test
5, Duplicate database
    RUN
    {
    allocate auxiliary channel c1 DEVICE TYPE disk;
    DUPLICATE TARGET DATABASE to test nofilenamecheck ;
    }
6, Duplicate database before current time
    RUN
    {
    allocate auxiliary channel c1 DEVICE TYPE disk;
    DUPLICATE TARGET DATABASE to test nofilenamecheck UNTIL TIME “TO_DATE(’06/09/2009',’MM/DD/YYYY’)”;
    }
 
No comments:
Post a Comment