Backup Recovery   «Prev  Next»

Lesson 11

Backup Recovery Processes Conclusion

This module discussed the backup and recovery processes within Oracle.
Learning about the backup and recovery scripts is certain to help you better manage your database.
Now that you have completed this module, you should be able to:
  1. Explain the new features of RMAN
  2. Create a recovery catalog
  3. Create and run a backup script in RMAN
  4. Describe the new feature of specifying a character set for a control file
  5. Recover a failed database by using the line mode of RMAN
  6. Recover a failed database by using the RMAN GUI

Create RMAN backup script in Oracle 12c

To create an RMAN backup script in Oracle 12c, you can use the following steps:
  1. Start RMAN and connect to the target database and recovery catalog.
  2. Use the `CREATE SCRIPT` command to create the script. You can specify the name of the script and the backup commands that you want to include.
  3. Once you have created the script, you can run it using the `EXECUTE SCRIPT` command.

Here is an example of a simple RMAN backup script:
CREATE SCRIPT backup_script;
RUN {
  BACKUP DATABASE;
};
EXECUTE SCRIPT backup_script;

This script will back up the entire database. You can modify the script to back up specific tablespaces or files, or to use different backup options. You can also create more complex RMAN backup scripts that include multiple backup commands, conditional logic, and loops. For example, you could create a script that backs up different tablespaces at different times of day, or a script that backs up the database only if there have been changes since the last backup. Once you have created an RMAN backup script, you can run it manually or schedule it to run automatically using the Oracle Scheduler. Here is an example of how to schedule an RMAN backup script to run automatically:
BEGIN
  DBMS_SCHEDULER.CREATE_JOB(
    job_name => 'backup_job',
    job_type => 'EXECUTED_PROCEDURE',
    job_action => 'BACKUP_SCRIPT',
    start_date => SYSDATE,
    repeat_interval => 'FREQ=DAILY',
    end_date => NULL,
    enabled => YES);
END;

This will create a job called `backup_job` that will run the `BACKUP_SCRIPT` procedure every day. You can also use the Oracle Enterprise Manager Console to create and schedule RMAN backup scripts.

Backup and Recovery Concepts for Protected Databases

Each protected database that stores backups to a Recovery Appliance must have a globally unique database name (DB_UNIQUE_NAME). This global database name is used to identify the protected database to which a backup belongs. Backups for a protected database are written to the storage location that is specified in the protection policy associated with the protected database.

RMAN Glossary

  1. Character set: A character set defines the language character set in which the data within a database is stored.
  2. Control file: The control file is created and maintained by Oracle. It contains information about the physical locations of all files associated with the database as well as its logical information such as, the different tablespaces within a database as well as the character set information.
In the next module, we will learn about Oracle's new backup strategies.

Recovery Manager Enhancements - Quiz

Click the Quiz link below to review your understanding of the material covered in this module.
Recovery Manager Enhancements - Quiz