RMAN backup - Page 2
DBAsupport.com Forums - Powered by vBulletin
Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 61

Thread: RMAN backup

  1. #11
    Join Date
    Jan 2000
    Posts
    387
    Hi

    If I am using the following RMAN script for hot backup daily, will it be able to recover my whole database?

    I will crosscheck obsolete backup and delete them weekly... Is there a more automated way of controlling the old backups or archived logs?

    connect target /
    set snapshot controlfile name to '/backup/orcl_snapshot.ctl';

    run
    {
    allocate channel ch1 type disk;
    sql 'alter system archive log current';
    backup format '/backup/orcl/%d_t%t_s%s_p%p'
    filesperset=4
    database plus archivelog;
    release channel ch1;
    }

  2. #12
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    allocate channel ch1 type
    disk format '/Backup/orcl/%d_ARCH_%u_%s_%p';
    backup archivelog
    until time 'Sysdate-2' all
    delete input;
    release channel ch1;

    Will keep only two days worth of archivelogs and delete the rest of archivelogs after backing them up.If the backup is not sucessfull delete will not happen.

    regards
    Hrishy

  3. #13
    Join Date
    Jan 2000
    Posts
    387
    Thanks!

    I will do the database backup first without the line "plus archivelog" right? I tried to do the archivelogs backup after the database backup as shown in Hrishy's posting.

    I did "alter system switch logfile" before the archivelogs backup, however I am still encountering the same errors... Any help please?

    RMAN-20242: specification does not match any archive log in the recovery catalog

  4. #14
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    If we ask rman to backup archivelogs that are more than 2days old and there are none, thats not an error. so no need to worry about it.

    regards
    Hrishy

  5. #15
    Join Date
    Jan 2000
    Posts
    387
    Thanks Hrishy!

    In this case, if I set the backup archivelogs as a daily backup cronjob then it will always produce this error 'coz there are no 2 days worth of archivelogs to backup? It will only starts to backup and delete the archivelogs when there are 2 days worth of archivelogs? Am I right?

    If I have dropped a tablespace and want to recover from RMAN, is this possible?

  6. #16
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    Errors would be produced only for about two days..not after that as 2 days worth of archive logs would remain on disk.so you wont get this error everyday.

    You need to do point in time recovery if you want to get back a dropped table
    space from RMAN .read up the oracle docs on RMAN on how to do this.

    regards
    Hrishy

  7. #17
    Join Date
    Jan 2000
    Posts
    387
    Thanks Hrishy for all your replies! I will go check out the manuals

    Cheers!

  8. #18
    Join Date
    Apr 2003
    Posts
    353
    You also need to validate your rman backups.
    And also you need to restore your database to some other place (Duplicate)
    to confirm the strategy with various timings, and to understand the concepts.

  9. #19
    Join Date
    Jan 2000
    Posts
    387
    I have been reading the TSPITR manual. There is one catch as shown in the list of restrictions below :

    When performing RMAN TSPITR, you cannot do the following:
    # Recover dropped tablespaces.
    # Recover a tablespace that has been dropped and re-created with the same name.

    In this case, if i have accidently dropped a tablespace, there is no way to recover it?

  10. #20
    Join Date
    Jan 2001
    Posts
    2,828
    Hi

    You are talking two different concepts.

    1)TPSIPTR thats for a different purpose all together.

    In your question you had asked can i recover a
    dropped tablespace the answer is definately
    a yes and here is

    Code:
    To recover the database until a specified time, SCN, 
    or log sequence number:
    
    After connecting to the target database and, optionally, the recovery catalog database, ensure that the database is mounted. 
    If the database is open, shut it down and then mount it: 
    SHUTDOWN IMMEDIATE;
    STARTUP MOUNT;
    
    
    Determine the time, SCN, or log sequence that should end recovery. 
    For example, if you discover that a user accidentally
    dropped a tablespace at 9:02 a.m., 
     then you can recover to 9 a.m.--just before the drop occurred. 
    You will lose all changes to the database made after that time. 
    
    You can also examine the alert.log to find the SCN of an event
    and recover to a prior SCN. Alternatively, you can determine
    the log sequence number that contains the recovery 
    termination SCN, and then recover through that log. 
    For example, query V$LOG_HISTORY to view the logs that 
    you have archived.
    
    RECID      STAMP      THREAD#    SEQUENCE#  FIRST_CHAN FIRST_TIM NEXT_CHANG
    ---------- ---------- ---------- ---------- ---------- --------- ----------
             1  344890611          1          1      20037 24-SEP-01      20043
             2  344890615          1          2      20043 24-SEP-01      20045
             3  344890618          1          3      20045 24-SEP-01      20046
    
    
    Perform the following operations within a RUN command: 
    Set the end recovery time, SCN, or log sequence. If specifying a time,
     then use the date format specified in the NLS_LANG and
     NLS_DATE_FORMAT environment variables. 
    If automatic channels are not configured, then manually
     allocate one or more channels. Restore and recover the database. 
    The following example performs an incomplete recovery 
    until November 15 at 9 a.m.
    
    RUN
    { 
      SET UNTIL TIME 'Nov 15 2001 09:00:00';
      # SET UNTIL SCN 1000;       # alternatively, you can specify SCN
      # SET UNTIL SEQUENCE 9923;  # alternatively, you can specify log sequence number
      RESTORE DATABASE;
      RECOVER DATABASE;
    }
    
    
    If recovery was successful, then open the database 
    and reset the online logs: 
    ALTER DATABASE OPEN RESETLOGS;
    this is from the documentation.

    TPSIPTR is when you want to recover only one
    tablespace to a different point in time
    you would probably want to use TPSIPTR when
    you want to recover a accidentally dropped table.

    Hope things clear up a bit :-)

    regards
    Hrishy
    Last edited by hrishy; 07-06-2005 at 12:45 AM.

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