01.09.2016 Views

Beginning Oracle Database 11g Administration From Novice to Professional

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

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

260<br />

CHAPTER 12 BACKUPS<br />

copy of the data in the tables such as is produced by Data Pump Export or a <br />

command.<br />

A logical backup can be much smaller than the corresponding physical backup because<br />

there is typically much unused space within the data blocks and the data files and because<br />

the database contains index data in addition <strong>to</strong> table data. However, logical backups cannot<br />

be used <strong>to</strong> res<strong>to</strong>re the database; they can only be used <strong>to</strong> re-create the data within an otherwise<br />

functional database.<br />

If the database (or part of it) is res<strong>to</strong>red from physical backups, then the redo logs can<br />

be used <strong>to</strong> recover all modifications <strong>to</strong> the data made since the physical backup was initiated.<br />

If a logical backup is used <strong>to</strong> re-create data, any modifications <strong>to</strong> the data made after<br />

the logical backup was initiated are lost.<br />

Consistent Backups vs. Inconsistent Backups<br />

Many databases are used around-the- clock; if the data in the database is being modified<br />

while the backup is being created, the backup might contain internal consistencies<br />

because each data block in the database is visited just once during a backup operation<br />

and any subsequent changes <strong>to</strong> the block will not be captured. The only way <strong>to</strong> guarantee<br />

a consistent backup is <strong>to</strong> make the database unavailable and prevent changes during the<br />

backup operation. However, inconsistent physical backups are very useful because the<br />

information contained in the redo log files can be used <strong>to</strong> fix any inconsistencies in such<br />

backups.<br />

Hot vs. Cold Backups<br />

Hot backups (also called online backups) are backups that are created while the database<br />

(or relevant portion thereof) is accessible by users and can be modified while the backup<br />

is underway. Cold backups (also called offline backups) are backups that are created while<br />

the database (or relevant portion thereof) is inaccessible and cannot be modified while<br />

the backup is underway.<br />

Hot backup and online backup are generally considered synonymous with inconsistent<br />

backup, while cold backup and offline backup are considered synonymous with<br />

consistent backup. However, if the database was not shut down gracefully, a cold backup<br />

also may contain inconsistencies. And it is possible <strong>to</strong> make a consistent logical backup<br />

of the database while the database is online. Finally note that an online backup of a portion<br />

of the database that cannot be modified (for example, a “read- only” table space) is<br />

guaranteed <strong>to</strong> be consistent.

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

Saved successfully!

Ooh no, something went wrong!