Managing your database backups is straightforward using the EM Database Control. In this section, we will give you an overview of the RMAN backup and catalog maintenance commands and show you how to monitor the Flash Recovery area and automate backups using the scheduler.
A number of backup management functions are available in the same screen in the EM Database Control. In the Maintenance tab, click the Manage Current Backups link to open the Manage Current Backups screen, as shown in Figure 10.10.
The four buttons at the top perform the following functions:
Catalog Additional Files Adds any image copy backups made outside RMAN to the RMAN catalog.
Crosscheck All Double-checks the backup files listed in the catalog against the actual files on disk to make sure that they are all available.
Delete All Obsolete Deletes all backup files not needed to satisfy the existing retention policy.
Delete All Expired Deletes the catalog entry for any backups not found when a crosscheck was performed.
If you are using the Flash Recovery area for all your backups, you want to make sure that you don't run out of space on the disk used for the Flash Recovery area. If your archived redo logs are sent to the Flash Recovery area, and you run out of disk space, redo log archiving halts, and the database is unavailable until you add more disk space or specify an alternate location.
In Figure 10.5, shown earlier in this chapter, we showed you how to create or modify the settings of the Flash Recovery area. In this example, we will use the same screen to monitor the status of the Flash Recovery area. In the Maintenance tab on the database home page, click Configure Recovery Settings to open the screen that displays the current status of the Flash Recovery area (see Figure 10.11) after you scroll to the bottom of the screen.
It appears that the Flash Recovery area is almost full with 14.621GB out of 15GB used. The Flash Recovery area settings screen includes the following information and options:
The location of the Flash Recovery area
The size of the Flash Recovery area
How much of the Flash Recovery area is in use
An option to configure an advanced recovery feature, flashback database
Click Delete All Obsolete to free up almost 10GB of disk space in the Flash Recovery area. At the RMAN command prompt, the equivalent command is as follows:
RMAN> delete noprompt obsolete;
Not all information about the Flash Recovery area is available via the EM Database Control interface. For all the details concerning the Flash Recovery area, you can use the dynamic performance view V$RECOVERY_FILE_DEST. After cleaning up obsolete files in the Flash Recovery area, run this query:
SQL> select name, space_limit max_size, 2 space_used used, space_reclaimable obsolete, 3 number_of_files num_files 4 from v$recovery_file_dest; NAME MAX_SIZE USED OBSOLETE NUM_FILES ---------------- ---------- ---------- ---------- ---------- /OraFlash 1.5729E+10 5367296000 0 526 1 row selected.
Now, no obsolete files are left in the Flash Recovery area, and we have approximately 5GB used out of 15GB. Currently, 526 files are in the Flash Recovery area; this information is not available via the EM Database Control interface.
Automating any of the backup operations via the EM Database Control is straightforward. In the database home page, click the Maintenance tab, click Schedule Backup, and select your backup options such as strategy and destination. In step 3, you can specify when the backup will first run, whether it will repeat, and how many times it will repeat. These options are displayed in Figure 10.12.