DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Control file recovery, from RMAN

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    12

    Control file recovery, from RMAN

    Hi
    (ORACLE VERSION 8.1.7.4)
    I am testing my rman backup and recovery. Backup was successfull.
    The script for my backup is
    run {
    ${channel1}
    ${channel2}
    backup incremental level ${inclevel}
    filesperset 5
    tag ${mytag}
    format
    '${format}.bus' database include current controlfile;
    sql 'alter system archive log current';
    backup filesperset 50
    archivelog all
    format
    '${format}.bar'${format_arc_del};
    release channel c1;
    release channel c2;
    }

    as my format is *.bus
    ------------
    Now to the question, I was able to recover the database using rman, if the controlfile is good. If I lost the control file?, so I want to test the recover the control file using the latest rman backup (here it is full backup).
    I tried all the sorts.. couldn't
    Any Ideas.
    Thx
    C

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    what did you try

  3. #3
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Cool


    Just restore the cotrolfile:
    PHP Code:
    CONNECT TARGET /
    CONNECT CATALOG RMANCAT/FOOBAR@RMAN
    STARTUP FORCE NOMOUNT PFILE
    =$ORACLE_HOME/DBS/INIT.ORA
    RUN 
    {
     
    ALLOCATE CHANNEL CH1 TYPE DISK;
     
    SET UNTIL SCN=1447485626;
     
    RESTORE CONTROLFILE;
     
    SQL ‘ALTER DATABASE MOUNT’;


    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  4. #4
    Join Date
    Sep 2006
    Posts
    114
    Quote Originally Posted by LKBrwn_DBA

    Just restore the cotrolfile:
    PHP Code:
    CONNECT TARGET /
    CONNECT CATALOG RMANCAT/FOOBAR@RMAN
    STARTUP FORCE NOMOUNT PFILE
    =$ORACLE_HOME/DBS/INIT.ORA
    RUN 
    {
     
    ALLOCATE CHANNEL CH1 TYPE DISK;
     [
    B]SET UNTIL SCN=1447485626;[/B]
     
    RESTORE CONTROLFILE;
     
    SQL ‘ALTER DATABASE MOUNT’;



    is Scn# optional or mandatory?
    if SCN# is mandatory then how can we determine the SCN No?

  5. #5
    Join Date
    Sep 2006
    Posts
    114

    Control File Recovery

    Quote Originally Posted by LKBrwn_DBA

    Just restore the cotrolfile:
    PHP Code:
    CONNECT TARGET /
    CONNECT CATALOG RMANCAT/FOOBAR@RMAN
    STARTUP FORCE NOMOUNT PFILE
    =$ORACLE_HOME/DBS/INIT.ORA
    RUN 
    {
     
    ALLOCATE CHANNEL CH1 TYPE DISK;
     
    SET UNTIL SCN=1447485626;
     
    RESTORE CONTROLFILE;
     
    SQL ‘ALTER DATABASE MOUNT’;


    But if the database structure(a tablespace has been added) has been changed since last backup of database
    is that an optimal solution to just restore the control file and DB will be in running state?
    or we have to recover database using backup control file?

  6. #6
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Cool

    Quote Originally Posted by M.Shakeel Azeem
    But if the database structure(a tablespace has been added) has been changed since last backup of database
    is that an optimal solution to just restore the control file and DB will be in running state?
    or we have to recover database using backup control file?
    NO, the original question was "How do I restore controlfile from backup?".

    After restoring controlfile, there is need to restore database.

    Quote Originally Posted by M.Shakeel Azeem
    is Scn# optional or mandatory?
    if SCN# is mandatory then how can we determine the SCN No?
    Unless you have have ALL archive and redo logs available you need to do point-in-time recovery, which requires either an SCN or a timestamp.

    To locate SCN you would need the rman 'LOG' generated at the time of the backup --or-- from rman catalog if you have one.

    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  7. #7
    Join Date
    Sep 2006
    Posts
    12
    hello Lkbrwn
    I am connecting to rman with 'no catalog' option. Are the same steps do follow. How do we get the SCN?
    Thx
    Appreciate your responce
    C

  8. #8
    Join Date
    Jul 2002
    Location
    Lake Worth, FL
    Posts
    1,492

    Cool

    Without catalog, you may need to supply the backup file name -- no SCN necesary (yet), but you need to set the dbid:

    PHP Code:
    SET DBID=<integer>
    RUN {
    ALLOCATE CHANNEL CH1 TYPE DISK
    RESTORE CONTROLFILE FROM FILE '<path>/<bkp file>'
    SQL ‘ALTER DATABASE MOUNT’

    To restore the DB you may need an SCN or SET UNTIL TIME...


    PS: Pls check for correct syntax.
    "The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb

  9. #9
    Join Date
    Mar 2002
    Location
    Mesa, Arizona
    Posts
    1,204
    Do you have a controlfile to recover?
    Is your controlfile part of your backup?
    Is AUTOBACKUP CONTROLFILE on?

    Ken
    "I do not fear computers. I fear the lack of them." Isaac Asimov
    Oracle Scirpts DBA's need

  10. #10
    Join Date
    Sep 2006
    Posts
    12
    Hi Brwn,
    I tried what you said but, it
    RUN {
    2> ALLOCATE CHANNEL CH1 TYPE DISK;
    3> RESTORE CONTROLFILE FROM FILE '/backup/prod/backup/full/rman_PROD_601742701_0jhtrnbd.bus';
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01005: syntax error: found "identifier": expecting one of: "tag"
    RMAN-01008: the bad identifier was: FILE
    RMAN-01007: at line 3 column 26 file: standard input

    Got the above error.
    Any idea?.

Posting Permissions

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


Click Here to Expand Forum to Full Width