24.12.2012 Views

Backing Up Oracle - Computing at Cornell

Backing Up Oracle - Computing at Cornell

Backing Up Oracle - Computing at Cornell

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The following is an explan<strong>at</strong>ion of various st<strong>at</strong>ements in our coding example:<br />

set maxcorrupt for d<strong>at</strong>afile 1 to 0 causes <strong>Oracle</strong> to abort the backup<br />

process if RMAN detects corrupt blocks in the SYSTEM tablespace. In our<br />

d<strong>at</strong>abase, we used AUTOEXTEND=ON for all d<strong>at</strong>afiles. D<strong>at</strong>afile 1 is<br />

always used for the SYSTEM tablespace.<br />

backup full causes a whole d<strong>at</strong>abase backup.<br />

filesperset 3 forces RMAN to include maximal 3 files in a backup set.<br />

A possible restore from a single d<strong>at</strong>afile will be faster processed.<br />

form<strong>at</strong> ‘%d%t%s%p’ cre<strong>at</strong>es a TSM low level name including d<strong>at</strong>abase<br />

name/timestamp/backup set number/backup piece number.<br />

tag ‘beach offline Monday Full’ is a user defined symbolic name which is<br />

assigned to backup sets. It makes it easier to address these backups in<br />

RMAN restore or change commands.<br />

alter d<strong>at</strong>abase open finally makes the d<strong>at</strong>abase accessible to users.<br />

10.3.2 Archived redo log backup<br />

This example shows how to back up the archived redo logs. Before you back<br />

up the archived redo logs, <strong>Oracle</strong> recommends th<strong>at</strong> you archive the current<br />

online redo log file by using the alter system archive current log command.<br />

C:\oracle\admin\scripts>rman target internal/manager@beach rcvc<strong>at</strong> rman/rman@ri<br />

cmdfile=backup_archlog_beach log=backup_archlog_beach.log<br />

The next example shows how to back up archived redo logs from one<br />

archivelog destin<strong>at</strong>ion.<br />

sql 'alter system archive log current' ;<br />

run {<br />

alloc<strong>at</strong>e channel t1 type 'sbt_tape' parms<br />

'ENV=(DSMO_AVG_SIZE=1)';<br />

alloc<strong>at</strong>e channel t2 type 'sbt_tape' parms<br />

'ENV=(DSMO_AVG_SIZE=1)';<br />

backup<br />

filesperset 20<br />

form<strong>at</strong> '%d/LOGS/%t/%s/%p'<br />

archivelog all<br />

delete input ;<br />

release channel t1 ;<br />

release channel t2 ;<br />

}<br />

Chapter 10. <strong>Oracle</strong> backup consider<strong>at</strong>ions on Windows 2000 165

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

Saved successfully!

Ooh no, something went wrong!