11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

270 CHAPTER 6 ■ BACKUP AND RECOVERYstarting media recoverystarting media recoverymedia recovery complete, elapsed time: 00:00:01Finished recover at 20-MAY-07RMAN>Once the database recovers all the physically corrupted data blocks, it removes the informationabout the previously corrupted data blocks from the V$DATABASE_BLOCK_CORRUPTIONview.RMAN Management Enhancements<strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g implements several general enhancements in the RMAN managementarea. These improvements include new RMAN persistent configuration parameters, the introductionof substitution variables in RMAN scripting, multisection backups wherein RMANbacks up a large datafile in sections, improved archived redo log management, archived redolog failover, the new backup shredding feature, and the optimized backup of undo data. Thereis also a new archival backup feature and a new validate command in this release. We’ll coverthese new backup and recovery management–related features in detail in the following sections.Scripting with RMAN Substitution VariablesYou can now use substitution variables in RMAN command files, which you can then incorporatein shell scripts. Using substitution variables lets you create dynamic command files thatyou can use for multiple backup jobs. All you have to do is pass different values for the substitutionvariables for different RMAN jobs.Include the new clause using to specify the substitution variables you’re using in the RMANcommand file. Use the familiar integer syntax (&1, &2, and so on) to indicate the substitutionvariables to which you’d like to assign values. Here’s a simple example that shows how to createa dynamic backup shell script:1. Create an RMAN script named backup.cmd that uses two substitution variables:# backup.cmdconnect sys/@prod1run {backup databasetag &1format '/u01/app/oracle/backup/&2%U.bkp'keep forever;}exit;The script shown here will back up the database using two substitution variables (&1 and&2), one for the backup tag and the other for the string value in the format specification.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!