Updating a Protection Policy

This section explains how to update protection policies using either Cloud Control (recommended) or the DBMS_RA PL/SQL package.

You must be logged in to the metadata database as RASYS or as a named db_user with user_type=admin. The protection policy must exist.

In this example, the protection policy is bronze_dev and is changing its disk recovery window goal from 3 days to 6 days.

To update a protected database with Cloud Control:

  1. Access the Protection Policies page, as described in "Accessing the Create Protection Policy Page in Cloud Control".

  2. In the Protection Policies table, select the protection policy that you want to edit.

    For example, select the BRONZE_DEV row.

  3. Click Edit.

    The Edit Protection Policy page appears.

  4. Change the desired values, and then click OK.

    For example, in the Recovery Window field of the Disk Recovery Window Goal section, enter 6.

    The Protection Policies page appears, with the newly updated protection policy listed.

To update a protection Policy with DBMS_RA:

To update a protection policy, execute the DBMS_RA.UPDATE_PROTECTION_POLICY procedure. Parameters that are null retain their existing values. For example, if guaranteed_copy is currently NO for a protection policy, and if you specify null for this parameter in DBMS_RA.UPDATE_PROTECTION_POLICY, then the value remains NO.

  1. Start SQL*Plus or SQL Developer, and then log in to the metadata database as RASYS or as a named db_user with user_type=admin.

  2. Run the DBMS_RA.UPDATE_PROTECTION_POLICY procedure.

    For example, execute the following PL/SQL anonymous block:

    BEGIN
     DBMS_RA.UPDATE_PROTECTION_POLICY(
      protection_policy_name => 'bronze_dev',
      recovery_window_goal   => INTERVAL '6' DAY);
    END;
    
  3. Optionally, query the recovery catalog to confirm the update of the policy.

    For example, query RA_PROTECTION_POLICY as follows (sample output included):

    COL POLICY_NAME FORMAT a11
    COL DESCRIPTION FORMAT a36
    SELECT POLICY_NAME, DESCRIPTION, 
           TO_CHAR(EXTRACT(DAY FROM RECOVERY_WINDOW_GOAL),'fm00')    ||':'||
           TO_CHAR(EXTRACT(HOUR FROM RECOVERY_WINDOW_GOAL),'fm00')   ||':'||
           TO_CHAR(EXTRACT(MINUTE FROM RECOVERY_WINDOW_GOAL),'fm00') ||':'||
           TO_CHAR(EXTRACT(SECOND FROM RECOVERY_WINDOW_GOAL),'fm00')
             AS "DD:HH:MM:SS"
    FROM   RA_PROTECTION_POLICY
    WHERE  POLICY_NAME='BRONZE_DEV';
    
    POLICY_NAME DESCRIPTION                          DD:HH:MM:SS
    ----------- ------------------------------------ ---------------
    BRONZE_DEV  For protected dbs in bronze tier     06:00:00:00