Results 1 to 4 of 4

Thread: Restore RMAN

  1. #1
    Join Date
    Jul 2008
    Posts
    27

    Unanswered: Restore RMAN

    Dear Sir,

    I got step for restore RMAN to other Server. But I still not clear because I has two servers and my production server has database name is ORCL and My Testing Server has database name is TESTDB.

    They use command for restore controlfile from ...


    I think I can't using this command because my database name at testing server is not same production server.

    Can you show me how to correction this step?

    Thank.



    This is step from Metalink :
    Restoring a database using rman on a different node with different backup directory structures and different database directory structures .

    - You have a database backed up on NODE 1
    - You need to restore the database on NODE 2
    - The directory structure is different on NODE 2
    - You need to put the backups in a new directory structure in NODE 2 unlike as they were in NODE 1
    - You need to restore the database files into a new directory structure in NODE 2 unlike as they were in NODE 1
    Solution
    Below is the procedure with an example:

    1) Connect to the target database using rman and backup the database ---> NODE 1

    $ rman target /

    Recovery Manager: Release 10.2.0.1.0 - Production on Tue Feb 13 00:29:33
    2007

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    connected to target database: ORA10G (DBID=3932056136)

    RMAN>
    backup database plus archivelog;


    Starting backup at 13-FEB-07
    current log archived
    using channel ORA_DISK_1
    channel
    ORA_DISK_1: starting archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1
    sequence=143 recid=109 stamp=614392105
    channel ORA_DISK_1: starting piece 1 at 13-FEB-07
    channel ORA_DISK_1: finished piece
    1 at 13-FEB-07
    piece

    handle=/u01/oracle/product/oradata/ora10g/fra/ORA10G/backupset/2007_02_13/o1_mf_annnn_TAG20070213T002825_2x21kbds

    _.bkp
    tag=TAG20070213T002825 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
    Finished backup at 13-FEB-07

    Starting
    backup at 13-FEB-07
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying
    datafile(s) in backupset
    input datafile fno=00003 name=/u01/oracle/product/oradata/ora10g/data/sysaux01.dbf
    input datafile
    fno=00001 name=/u01/oracle/product/oradata/ora10g/data/system01.dbf
    input datafile fno=00002 name=/u01/oracle/product/oradata/ora10g/data/undotbs01.dbf
    input
    datafile fno=00004 name=/u01/oracle/product/oradata/ora10g/data/users01.dbf
    input datafile fno=00005 name=/home/oracle/1.dbf
    input
    datafile fno=00006 name=/u01/oracle/product/oradata/ora10g/data/sysaux02.dbf
    input datafile fno=00007 name=/u01/oracle/product/oradata/ora10g/data/undotbs02.dbf
    channel
    ORA_DISK_1: starting piece 1 at 13-FEB-07
    channel ORA_DISK_1: finished piece 1 at 13-FEB-07
    piece

    handle=/u01/oracle/product/oradata/ora10g/fra/ORA10G/backupset/2007_02_13/o1_mf_nnndf_TAG20070213T002827_2x21kd12
    _.bkp
    tag=TAG20070213T002827 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
    Finished backup at 13-FEB-07

    Starting
    backup at 13-FEB-07
    current log archived
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting archive log backupset
    channel
    ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=144 recid=110 stamp=614392165
    channel
    ORA_DISK_1: starting piece 1 at 13-FEB-07
    channel ORA_DISK_1: finished piece 1 at 13-FEB-07
    piece

    handle=/u01/oracle/product/oradata/ora10g/fra/ORA10G/backupset/2007_02_13/o1_mf_annnn_TAG20070213T002925_2x21m6ty
    _.bkp
    tag=TAG20070213T002925 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
    Finished backup at 13-FEB-07

    Starting
    Control File and SPFILE Autobackup at 13-FEB-07
    piece handle=/u01/oracle/product/ora10g/dbs/c-3932056136-20070213-02 comment=NONE
    Finished Control File and SPFILE Autobackup at 13-FEB-07

    RMAN> exit











    2) Move the following files to the NODE 2 :
    + The database backup pieces
    + Controlfile backup piece
    + The parameter file i.e init.ora file

    3) Edit the PFILE on NODE 2 to change the environment specific parameters like .
    user_dump_dest =
    background_dump_dest =
    control_files =

    4) Once the PFILE is suitably modified invoke Rman on the NODE 2 after setting the Oracle environment variables and start the database in nomount mode:



    [oracle@test-br test]$ export ORACLE_HOME=/u01/oracle/product/ora10g
    [oracle@test-br test]$ export ORACLE_SID=ora10g
    [oracle@test-br test]$ export PATH=$ORACLE_HOME/bin:$PATH
    [oracle@test-br test]$ rman target /
    Recovery Manager: Release 10.2.0.1.0 - Production on Tue Feb 13 00:36:55 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database (not started)
    RMAN> startup nomount
    Oracle instance started
    Total System Global Area 205520896 bytes
    Fixed Size 1218508 bytes
    Variable Size 75499572 bytes
    Database Buffers 121634816 bytes
    Redo Buffers 7168000 bytes

    5) Restore the controlfile from the backup piece .


    RMAN> restore controlfile from '/u01/oracle/product/ora10g/dbs/c-3932056136-20070213-02';
    Starting restore at 13-FEB-07
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=155 devtype=DISK
    channel ORA_DISK_1: restoring control file
    channel ORA_DISK_1: restore complete,
    elapsed time: 00:00:02
    output filename=/u01/oracle/product/oradata/ora10g/cntrl/control01.ctl
    Finished restore at 13-FEB-07

    6) Mount the database

    RMAN> alter database mount ;



    7) Now catalog the backup pieces that were shipped from NODE 1

    RMAN> catalog backuppiece '/home/oracle/test/backup/o1_mf_annnn_TAG20070213T002925_2x21m6ty_.bkp';

    Starting
    implicit crosscheck backup at 13-FEB-07
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=155 devtype=DISK
    Crosschecked
    3 objects
    Finished implicit crosscheck backup at 13-FEB-07

    Starting implicit crosscheck copy at 13-FEB-07
    using channel
    ORA_DISK_1
    Finished implicit crosscheck copy at 13-FEB-07

    searching for all files in the recovery area
    cataloging files...
    no
    files cataloged

    cataloged backuppiece
    backup piece handle=/home/oracle/test/backup/o1_mf_annnn_TAG20070213T002925_2x21m6ty_.bkp
    recid=41

    stamp=614393265

    RMAN> catalog backuppiece '/home/oracle/test/backup/o1_mf_annnn_TAG20070213T002825_2x21kbds_.bkp';

    cataloged
    backuppiece
    backup piece handle=/home/oracle/test/backup/o1_mf_annnn_TAG20070213T002825_2x21kbds_.bkp recid=42

    stamp=614393292

    RMAN>
    catalog backuppiece '/home/oracle/test/backup/o1_mf_nnndf_TAG20070213T002827_2x21kd12_.bkp';

    cataloged backuppiece
    backup
    piece handle=/home/oracle/test/backup/o1_mf_nnndf_TAG20070213T002827_2x21kd12_.bkp recid=43

    stamp=614393310



    8) Get to know the last sequence available in the archivelog backup using the following command

    RMAN > list backup of archivelog all;



    9) Rename the Redologfiles,so that they can be created in new locations when opened the database is opened in resetlogs

    SQL> alter database rename file '/u01/oracle/product/oradata/ora10g/log/redo01.log' to '/home/oracle/test/log/redo01.log';
    ......
    ......
    ......



    10) Now restore the datafiles to new locations and recover

    RMAN> run
    {
    set until sequence <seq_no>
    set newname for datafile 1 to '/home/oracle/test/data/sys01.dbf';

    set newname for datafile 2 to '/home/oracle/test/data/undotbs01.dbf';
    set newname for datafile 3 to '/home/oracle/test/data/sysaux01.dbf';

    set newname for datafile 4 to '/home/oracle/test/data/users01.dbf';
    set newname for datafile 5 to '/home/oracle/test/data/1.dbf';

    set newname for datafile 6 to '/home/oracle/test/data/sysaux02.dbf';
    set newname for datafile 7 to '/home/oracle/test/data/undotbs02.dbf';

    restore database;
    switch datafile all;
    recover database;
    alter database open resetlogs;
    }

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Why would it be unacceptable to restore database ORCL on your test system?
    Depending upon Oracle version, it is possible to change SID during a restoration, but the name change complicates an already complicated effort.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jul 2008
    Posts
    27
    I create database name at testing server is the same production server, but I copy RMAN backup file from production server to keep at testing server is not the same structure.
    Ex : controlfile from production server is :/u01/c-3932056136-20070213-02
    to testing server is : /oracle/c-3932056136-20070213-02

    Can I restore controlfile from /oracle/c-3932056136-20070213-02 without using command catalog backuppiece /oracle/c-3932056136-20070213-02?
    Because I see when restore datafile , they need to using command : catalog backuppiece.

  4. #4
    Join Date
    Jan 2011
    Posts
    1

    Lightbulb need help

    this is chandran and i am fresher. i like to know the queri?

    how to find where the rman pieces are located?

    what are the different types of standby?

    consider u are having production dbs rman backup. how will u install the backup in a fresh server?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •