I have created this learn oracle "The step 10 process" Oracle Tutorial to help Database aspirants to accomplish their dream of working as Oracle Database administrator. I have tried to keep it simple and User friendly. Use NEXT and PREVIOUS Button to navaigate away and to a chapter. Since i myself had been a Database adminstrator trainer and has got real life experience of working as a Oracle DBA, I would welcome any sort of queries and doubts or modifications to firstname.lastname@example.org.
Step 9 - Oracle database backup concepts
Learn Oracle - Database Backup Concepts
To understand the Oracle-suggested backup strategy and other backup types provided
through Enterprise Manager, Oracle DBA need some conceptual background on database
backups as supported by Oracle.
Full Backups of Datafiles
A full backup of a datafile is a backup which includes all used blocks of the datafile.
This can be either an image copy backup, which is an exact copy of the datafile as if
copied with a host operating system file copy command, or a backup into a backup set
created by RMAN. Regardless of the form in which the backup is stored, the entire
datafile is backed up, even if only a few blocks have changed.
Incremental Backups of Datafiles
Incremental backups are based around capturing only those blocks that change
between backups in each datafile of your database. In a typical incremental backup
strategy, a level 0 incremental backup, capturing all blocks in the datafile, is taken as a
starting point. Subsequent level 1 incremental backups, typically taken at regular
intervals, capture images of each block in a datafile that changed. Level 1 backups can
be cumulative, in which case all blocks changed since the most recent level 0 backup
are included, or differential, in which case only those blocks changed since the most
recent level 0 or level 1 incremental backup are included.
Recovering changed blocks from incremental backups is used to improve performance
of the media recovery process. Since an incremental level 1 backup captures the final
contents of all datafile blocks changed during the period covered by the incremental,
the recovery process can skip reapplying individual updates from the redo logs of that
period and simply update each block with its final contents. The redo logs are only
used for the period not covered by level 1 incremental backups.
Incrementally Updated Backups: Rolling Forward Image Copies of Datafiles
The incrementally updated backups feature of Oracle lets Oracle DBA use one or more level 1
incremental backups with an older image copy backup of your datafiles, to roll the
copy forward to the SCN at which the last level 1 incremental backup was taken. All
blocks changed since the image copy was created are overwritten with their new
contents as of the time of the last level 1 incremental backup. The effect is to roll the
file forward in time, so that its contents are equivalent to an image copy full datafile
backup taken at the time of the last incremental level 1 backup. This feature lets Oracle DBA
implement strategies with shorter recovery times, because Oracle DBA need only perform
recovery starting at the SCN of the last level 1 incremental applied to your datafiles.
All RMAN backups, including incremental backups, can be tagged with a label, a text
string identifying that backup, either uniquely or as part of a group of backups. (For
instance, if Oracle DBA performed a weekly full database backup on Saturday nights, Oracle DBA
could use the tag FULL_SATURDAY to identify all such backups.) These tags can be
used for referring to specific backups in RMAN commands; for example, Oracle DBA could
issue a command to move the latest FULL_SATURDAY backup to tape.
Because Oracle DBA can use tags to refer to different groups of backups, they are useful if Oracle DBA
want to create several different routines in your overall backup strategy which do not
interfere with each other.
When Oracle DBA schedule a backup job and give the job a name, the job name is used to tag
the backup.Performing and Scheduling Backups with Enterprise Manager
Enterprise Manager lets Oracle DBA take backups of all types supported by Oracle. It also lets
Oracle DBA schedule backups for use in a backup strategy.
Performing a Whole Database Backup with Oracle Enterprise Manager
Whole backups of a database are based on backing up the entire contents of the
database at the time of backup. Full backups of all datafiles are created. The results
may be stored as image copies or as backup sets, but in either case the complete
contents of all datafiles of the database are represented in the backup, as well as the
control file, archived redo log and server parameter file. With this set of files, the
database can be recovered completely.
While whole database backups can be an important element in your overall backup
strategy, they are also a required step in some situations, such as when you switch
ARCHIVELOG mode on or off.
The first field is a Backup Strategy field, where you can choose between
Oracle-suggested (the default) and Customized. For a whole database backup, choose
Customized. The page refreshes itself, to offer a choice of objects to back up and a
space to enter host credentials. Select Whole Database as the set of objects to back up.
Enter your host operating system credentials if required, and click Continue.
On the Schedule Backup: Options page, you specify the options for this whole
database backup. Under Backup Type, choose Full Backup. For Backup Mode, choose
between an online and offline backup. Typically, Oracle DBA will want to perform online
backups, to maximize database availability.
Under the Advanced section, if this is an online backup, check the box to back up all
archived logs. (There is no need to back up archived logs when performing an offline
backup, as the database will be in a consistent state at the time of backup and does not
require media recovery if Oracle DBA restore from this backup.) For now, leave the option for
proxy copies unchecked. Do not specify a maximum number of files for each backup
set. Click Next to move on to the Backup: Settings page.
On the Schedule Backup: Settings page, select the appropriate backup destination.
Oracle Corporation recommends backing up to disk, to minimize recovery time. Then,
click Next to move on to the Schedule Backup: Schedule page.
On the Schedule Backup: Schedule page, enter the schedule for the backup job, or
specify to perform it immediately. A Job Name is generated for Oracle DBA, but if Oracle DBA want to
tag this backup, you can edit the assigned job name, which is used as the tag. You can
also edit the Job Description as needed for your own reference. Then, in the Schedule
fields, you specify when to start the backup, and how often to repeat it. Leave the
default start time of Immediately selected to run a backup immediately, or set Later
and enter a later time. For jobs to be run regularly, set the Repeat and Repeat Until
parameters as appropriate. (Oracle DBA probably want to change the Job Name in this case, to
identify these scheduled backups as part of an ongoing series, such as WEEKLY_
FULL_BACKUP. When finished, click Next to move on to the Schedule Backup:
On the Schedule Backup: Review page, Oracle DBA have one last chance to use the Back
button and change these options.Oracle DBA can also click Edit RMAN Script to see the
RMAN commands that will be executed to perform your specified backup jobs. Click
Submit Job to add the specified backup job to the schedule (or to run it immediately).
To monitor the progress of the backup job, Oracle DBA can click View Job.You will arrive on a
page that shows a summary of the job submitted, and a Logs section where you can
follow the progress of the various steps of the backup job and drill down to see the
RMAN output from the running job.
Performing Offline Database Backups
When performing an offline backup, the database instance shuts down, then restarts
and enters a MOUNTED state for the duration of the offline backup. The offline
backup runs in the background, generating no user-visible output in the browser. The
fact that the database is not open affects the pages you see from Enterprise Manager
while the offline backup runs.
After you submit the backup job, the Backup Submit Successful page appears, and
suggests that Oracle DBA wait long enough for the offline backup to complete, then click View
Job to be redirected to the Job Status page.
In this situation, because Oracle DBA know that the database is down in order to run its offline
backup, do not choose either option. Wait long enough for the offline backup to
complete, then reload the browser page again. At that time Oracle DBA will be prompted for
database login credentials, and then returned to the job status page, where Oracle DBA can
view the final results of the offline backup job.
If Oracle DBA attempt to reload the status page while the database is shutting down and
coming back up to a MOUNT state, Oracle DBA may encounter an error page in your web
browser. Wait a short period and refresh the page again. This error does not indicate a
problem with the offline backup. Enterprise Manager must be restarted when the
database is shut down and brought to a MOUNT state. While Enterprise Manager is
being restarted, Oracle DBA may receive this error page.
If you attempt to reload the status page while the offline backup is in progress, you
may encounter a page with a message that reads: The database status is currently
unavailable. It is possible that the database is in mount or nomount state. Your choices on
this page are to click Startup or Perform Recovery. Do not click either button. The
offline backup is still running in the background and should not be interrupted.
Instead, reload this page periodically. After the offline backup completes and the
database opens, reloading this page will bring you to the database login page again.
A backup strategy is not complete until you validate that the backups produced can
actually be used to recover the database. The RMAN command line client provides the
RESTORE... VALIDATE command, which lets you confirm that a particular restore
operation can be performed with the backups you have available.
For example, if the RMAN command RESTORE DATABASE restores your entire
database from backup, RESTORE DATABASE VALIDATE examines the available
backups and redo logs to determine whether the RESTORE DATABASE operation
would complete successfully given the currently available set of backups. See Oracle
Database Backup and Recovery Basics for more details about validating backups.