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.

8.3 Recovery examples<br />

Archive log backup sets are restored as needed to perform a recovery. They<br />

are restored to the current archive log destin<strong>at</strong>ion as specified in the init.ora<br />

file.<br />

In the following sections we provide some examples of recovery using RMAN.<br />

8.3.1 D<strong>at</strong>afile recovery<br />

To test a d<strong>at</strong>afile recovery with RMAN, we performed following steps:<br />

The <strong>Oracle</strong> instance paris was up and running.<br />

User user1 in a SQL*Plus session was connected to paris. We cre<strong>at</strong>ed a<br />

new table in the USERS tablespace, inserted a row, and committed the<br />

changes.<br />

In a second telnet session, the root user destroyed the file with an<br />

echo ‘oops’ > /opt/app/oracle/orad<strong>at</strong>a/paris/users01.dbf<br />

User user1 inserted another row in the table and committed again.<br />

<strong>Oracle</strong> user sys connected to the d<strong>at</strong>abase and issued an alter system<br />

checkpoint.<br />

After the checkpoint, <strong>Oracle</strong> recognized the destroyed file and took th<strong>at</strong><br />

d<strong>at</strong>afile in st<strong>at</strong>us RECOVER. In the alertlog file of the instance, we saw<br />

following entries:<br />

Chapter 8. Recovering <strong>Oracle</strong> D<strong>at</strong>abases on UNIX 109

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

Saved successfully!

Ooh no, something went wrong!