Database Reference
In-Depth Information
The main difference between the cold archivelog mode backup and noarchivelog mode backup is that in step 2,
you run this query to identify the files to be backed up:
select name from v$datafile
union
select name from v$controlfile;
Also, you don't need to back up the data files associated with the TEMP tablespace. As of Oracle 10g, Oracle
automatically attempts to create missing data files associated with the TEMP tablespace (for locally managed temp
tablespaces) when the database is started.
Restoring and recovering with a cold backup of a database in archivelog mode is nearly identical to the restore
and recovery from a hot backup. See the sections “Performing a Complete Recovery of an Archivelog Mode Database”
and “Performing an Incomplete Recovery of an Archivelog Mode Database,” later in this chapter, for discussion of how
to restore and recover from a database in archivelog mode.
UNDerStaNDING the MeChaNICS DOeS Matter
knowing how a hot backup works also helps in untangling and surviving difficult rMan scenarios. rMan is a
sophisticated and highly automated tool. With just a few commands, you can back up, restore, and recover your
database. however, if there is a failure with any rMan command or step, an understanding of oracle's underlying
internal restore-and-recovery architecture pays huge dividends. a detailed knowledge of how to restore and
recover from a hot backup helps you logically think your way through any rMan scenario.
When you ride a bike, understanding how the derailleurs and gears and shifting work helps a great deal. you can
usually tell when a rider knows only to push one button to go slower and another button to go faster. riders who
understand in more detail how the chain moves between gears will always be smoother at shifting gears. My
editor, Jonathan gennick, recounted the following anecdote while reading an early draft of this chapter:
“I loaned my bike to a guy the other week and went on a ride with him. you should have heard the horrible noises
he conjured out of my derailleurs and drivetrain. I thought he was going to damage the bike. after a few minutes,
he rode up to me and told me that my front derailleur wasn't working right.
“the derailleur was fine. he was just one of those guys who knows only how to push the button, without any
understanding of what goes on underneath that action.”
similarly, effort you put into understanding how backup and recovery is implemented pays off in the long run.
you actually have less to remember—because your understanding of the underlying operation enables you to
think through problems and solve them in ways that checklists don't.
Implementing a Hot Backup Strategy
As discussed previously, RMAN should be your tool of choice for any type of Oracle database backup (either online
or offline). RMAN is more efficient than user-managed backups and automates most tasks. Having said that, one of
the best ways to gain an understanding of Oracle backup and recovery internals is to make a hot backup and then use
that backup to restore and recover your database. Manually issuing the commands involved in a hot backup, followed
by a restore and recovery, helps you understand the role of each type of file (control files, data files, archive redo logs,
online redo logs) in a restore-and-recovery scenario.
The following sections begin by showing you how to implement a hot backup. They also provide basic scripts
that you can use to automate the hot backup process. Later sections explain some of the internal mechanics of a hot
backup and clarify why you must put tablespaces in backup mode before the hot backup takes place.
 
Search WWH ::




Custom Search