When backing up to a ZDLRA you want to optimize your storage allocation to ensure each database can meet its recovery window goal.
There are 2 levers that control this for each database
1) Recovery Window Goal - How far back do I need to ensure a point in time recovery for my database
2) Disk Reserved Space - How much storage to I need to ensure I keep my recovery window goal.
When there is enough storage to support the desired recovery window, there are no issues. The only time the second lever becomes important (Disk Reserved Space) is when there is not enough space to support the recovery window goal for all databases.
How backups are prioritized for purging is described in this MOS note.
Zero Data Loss Recovery Appliance Purging Rules (Doc ID 2353188.1)
From this document, you can see that this is where the Disk Reserved Space allocation for each database becomes important.
The amount of Disk Reserved Space allocated compared to the amount of space needed to support the recovery window goal is used to decide the order in which databases backups are purged.
This lever (Disk Reserved Space) can be used to prioritize which databases to purge backups from first. For less critical databases you can set the value to less than what is needed causing these backups to be removed if needed. For the most critical databases you can set the value to be more than what you need for the Recovery Window Goal ensuring the backups won't be touched.
The combined Disk Reserved Space for all databases cannot be larger than the amount space available in the storage pool
Now the question comes up as to how to verify which databases are prioritized.
There is a package you can use to estimate how much storage is needed to support a given recovery window goal. This is can be used to determine if a databases's reserved space is enough to meet the goal. DBMS_RA.ESTIMAT_SPACE is the package you call.
ESTIMATE_SPACE
This procedure estimates the amount of storage in GB required for recovery of a given database and a desired recovery window.
Syntax
FUNCTION estimate_space (
db_unique_name IN VARCHAR2,
target_window IN DSINTERVAL_UNCONSTRAINED) RETURN NUMBER;
Parameters
Table 12-23 ESTIMATE_SPACE Parameters
Parameter | Description |
---|---|
db_unique_name | The name of the database needing the storage estimate. |
target_window | The desired recovery window for the database. Specify the goal as any valid INTERVAL DAY TO SECOND expression, such as INTERVAL '2' DAY (2 days), INTERVAL '4' HOUR (4 hours), and so on. |
Now by dynamically building a query from RA_DATABASE which contains
- DB_UNIQUE_NAME
- POLICY_NAME
- RECOVERY_WINDOW_GOAL
- DISK_RESERVED_SPACE
You can determine for each database if there is enough reserved space to meet the recovery window goal, and which Policy the database is a member of.
By grouping critical database in the same policy, you can alert for databases within your most critical policies that may not have a large enough DISK_RESERVED_SPACE.