This discussion is archived
6 Replies Latest reply: Dec 28, 2012 7:20 AM by mseberg RSS

understanding order of commands in RMAN script

616017 Newbie
Currently Being Moderated
I just started working at a new job and the prior DBA had already left before I got there. I'm looking at his RMAN script to backup the 11gR2 single instance database and I can't understand what is the need for two "crosscheck backup" commands? Wouldn't it be prudent to also have a "crosscheck backup of archivelog all" command as well? Also, what is the point of having the "restore database preview" command in the daily backup script?


run
{
crosscheck backup;
recover copy of database with tag 'ORA$OEM_LVL1_ILANDB_PRIM' until time 'SYSDATE-1';
backup incremental level 1 for recover of copy with tag 'ORA$OEM_LVL1_ILANDB_PRIM' database plus archivelog delete all input;
delete noprompt obsolete;
restore database preview;
crosscheck backup;
}
  • 1. Re: understanding order of commands in RMAN script
    mseberg Guru
    Currently Being Moderated
    Hello;

    This script looks overly complex if you ask me.
    run
    {
    crosscheck backup;
    recover copy of database with tag 'ORA$OEM_LVL1_ILANDB_PRIM' until time 'SYSDATE-1';
    backup incremental level 1 for recover of copy with tag 'ORA$OEM_LVL1_ILANDB_PRIM' database plus archivelog delete all input;
    delete noprompt obsolete;
    restore database preview;
    crosscheck backup;
    }
    I agree with you there's no need for two CROSSCHECK commands. ( I don't use any in mine )


    Beyond that the whole script really just looks like random RMAN commands. For example why would you delete input and delete obsolete in the same script? Pick one.

    This looks more like a special script or a test script. I would not use it. Double check your configure for RMAN and use a backup script you can trust.

    Please consider closing some of your old questions.
    run 
    { 
    allocate channel d1 type disk; 
    backup full as compressed backupset 
    database plus archivelog;
    release channel d1;
    }
    Best Regards

    mseberg
  • 2. Re: understanding order of commands in RMAN script
    616017 Newbie
    Currently Being Moderated
    Here is how RMAN is currently configured. How do you suggest I clean this up?

    RMAN> show all;

    using target database control file instead of recovery catalog
    RMAN configuration parameters for database with db_unique_name ORCL are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    CONFIGURE BACKUP OPTIMIZATION ON;
    CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u02/app/oracle/fast_recovery_area/ORCL/fullbackup/full_bkp_${DD}/%F';
    CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 4;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u02/app/oracle/fast_recovery_area/ILANDB/fullbackup/full_bkp_%d_DB_%u_%s_%p';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
    CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
    CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
    CONFIGURE EXCLUDE FOR TABLESPACE 'WEBTASK_DATA';
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_ORCL.f'; # default
  • 3. Re: understanding order of commands in RMAN script
    mseberg Guru
    Currently Being Moderated
    Hello again;

    These jump out at me.

    CONFIGURE RETENTION POLICY TO REDUNDANCY 1; ( too low would set to a least 2 and would consider higher )
    CONFIGURE EXCLUDE FOR TABLESPACE 'WEBTASK_DATA'; ( Would consider removing unless you have good reason for keeping )
    CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; ( Would review depending upon your setup - For Data Guard might be different )

    RETENTION POLICY can be Based on Redundancy or Recovery Window. For Redundancy I like 2 or 3, for Recovery Window I like 7.

    Best Regards

    mseberg
  • 4. Re: understanding order of commands in RMAN script
    678298 Newbie
    Currently Being Moderated
    Hi

    Two crosscheck backup might not necessary. but to make sure whether backup pieces, proxy copies, or disk copies still exist in comparison to the control file's repository.

    The PREVIEW option of the RESTORE command allows you to identify the backups required to complete a specific restore operation. The output generated by the command is in the same format as the LIST command. In addition the PREVIEW SUMMARY command can be used to produce a summary report with the same format as the LIST SUMMARY command. The following examples show how these commands are used.

    # Preview
    RESTORE DATABASE PREVIEW;
    RESTORE TABLESPACE users PREVIEW;

    # Preview Summary
    RESTORE DATABASE PREVIEW SUMMARY;
    RESTORE TABLESPACE users PREVIEW SUMMARY;
  • 5. Re: understanding order of commands in RMAN script
    616017 Newbie
    Currently Being Moderated
    But why include these either of these PREVIEW commands in the daily backup script?
  • 6. Re: understanding order of commands in RMAN script
    mseberg Guru
    Currently Being Moderated
    They would not be included in that type of script.

    Best Regards

    mseberg

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points