5 Replies Latest reply on Nov 21, 2008 4:54 PM by PktAces

    Interesting scenario, is there a need to reset logs periodically?

    PktAces
      10.2.0.2 Ent Ed -- Rman 10.2.0.2 -- aix 5.3

      Is there a possible need to perform a reset logs periodically? This question initially came to me at the worst of times, during a recovery of a fairly important database.

      If / when you have to perform an spfile or controlfile restore without a recovery catalog, if your log sequence is above 255 and your last backup was more than a day ago, is it possible your latest autobackup wont be found? In our scenario we had a day old controlfile snapshot that we used, but I'm not sure if we would have been able to recover had it not been there. From reading the 10g Recovery Manager Reference manual:

      "FROM AUTOBACKUP
      [autoBackupOptionList]
      Restores a control file autobackup. You can only specify this option on the RESTORE CONTROLFILE and RESTORE SPFILE commands. When restoring either type of file in NOCATALOG mode, the FROM AUTOBACKUP clause is required.

      RMAN begins the search on the current day or on the day specified with the SET UNTIL. If no autobackup is found in the current or SET UNTIL day, RMAN checks the previous day starting with sequence 256 (or the sequence specified by MAXSEQ) until it reaches 0. The search continues up to MAXDAYS days (default of 7, maximum of 366) from the current or SET UNTIL day. If no autobackup is found within MAXDAYS days, then RMAN signals an error and the command stops. "

      The doc doesn't mention it but if you haven't ever tried setting MAXSEQ > 256, you'll get an error if you do. 256 is the upper bound for the MAXSEQ parameter. This is a snippet from my test of that:

      <code>
      oracle_sandbox1> rman target /

      Recovery Manager: Release 10.2.0.2.0 - Production on Fri Nov 21 09:16:36 2008

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

      connected to target database: WEBDEV (DBID=1965364971)

      RMAN> show all;

      using target database control file instead of recovery catalog
      RMAN configuration parameters are:
      CONFIGURE RETENTION POLICY TO REDUNDANCY 5;
      CONFIGURE BACKUP OPTIMIZATION OFF; # default
      CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
      CONFIGURE CONTROLFILE AUTOBACKUP ON;
      CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
      CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
      CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
      CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
      CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
      CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
      CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
      CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
      CONFIGURE MAXSETSIZE TO UNLIMITED; # default
      CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
      CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
      CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
      CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/app/oracle/product/10.2/dbs/snapcf_webdev.f'; # default

      RMAN> run {
      2> allocate channel t1 type 'SBT_TAPE';
      3> restore spfile to pfile '/app/oracle/product/10.2/dbs/webdev_pfile.tst' from autobackup maxseq=300;
      4> }

      allocated channel: t1
      channel t1: sid=256 devtype=SBT_TAPE
      channel t1: Veritas NetBackup for Oracle - Release 6.5 (2007111606)

      Starting restore at 21-NOV-08

      released channel: t1
      RMAN-00571: ===========================================================
      RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
      RMAN-00571: ===========================================================
      RMAN-03002: failure of restore command at 11/21/2008 09:23:46
      RMAN-06494: MAXSEQ = 300 is out of range (0-255)

      RMAN>
      </code>