9.7.7.4 Task 4: Create a New Sparse Test Master Using a Previously Created Sparse Test Master

Create a new set of snapshots to provide a new test master and new sparse files to contain changes from the primary.

It is possible that at periodic intervals you will want to use the standby database to create additional snapshots without having to build a complete copy of the test master. You can repeat the process performed in the previous three tasks to do just that, taking advantage of the hierarchical snapshot functionality. The new test master is built on top of the latest existing snapshot that is applying redo. This snapshot becomes read-only and a new snapshot is built to continue the redo apply processing.

Do the following to configure the standby for the new test master time line:

  1. Perform the steps from Task 1: Prepare the Standby Database to Be Used as a Sparse Test Master with the following changes:

    The procedure is generally the same, however in this case the test master already uses sparse files.

    1. In Step 2, change all the commands that alter the DATA disk group to instead alter the SPARSE disk group.

      If the SPARSE disk group is already appropriately configured, you can skip the corresponding ALTER DISKGROUP ... SET ATTRIBUTE or ALTER DISKGROUP ... ADD USER command.

    2. In Step 4, supply a different name for the snapshot.

      You are creating a new snapshot, so the files need unique names from what was previously used. As a suggestion, you can append an identifier to the end of the file name to help identify it with the snapshot to be built. For example, if this was the original command:

      EXECUTE dbms_dnfs.clonedb_renamefile ('+SPARSE/TM_STANDBY/DATAFILE/system_515
      _930475939','+SPARSE/TM_STANDBY/DATAFILE/system_515_930475939');

      You can add an identifier to the end of the file name to create a unique file name, as shown here:

      EXECUTE dbms_dnfs.clonedb_renamefile ('+SPARSE/TM_STANDBY/DATAFILE/system_515
      _930475939','+SPARSE/TM_STANDBY/DATAFILE/system_515_930475939_Dec_15_16');

      This step must be repeated for each statement for the rename_files.sql script.

  2. Perform the steps as described in Task 2: Configure the Sparse Test Master and Sparse Files on the Standby Site.

Figure 9-17 Configuration After Repeating the Process


Description of Figure 9-17 follows
Description of "Figure 9-17 Configuration After Repeating the Process"

The process to create a new sparse test master can be repeated up to 9 times, which would create an environment 10 levels deep with the original standby data files and 9 hierarchical snapshots.  When repeating the process for the ninth time, do not create a new snapshot to receive the redo from the primary database.

Figure 9-18 Potential Future Configuration


Description of Figure 9-18 follows
Description of "Figure 9-18 Potential Future Configuration"

If you reach the maximum 10 levels, you have multiple options:

  • If you have enough space to maintain multiple copies of the standby database and snapshots, then create a new tree of hierarchical snapshots based on another standby database. The original standby data files and snapshots can remain as long as required.

  • If you do not have enough space to maintain multiple copies of the standby database and snapshots, then:

    1. Delete the snapshots and their associated data files, including any snapshots used as test masters.

    2. Refresh the standby.

    3. Create a new tree of hierarchical snapshots.

  • Create a new standby database on a different environment and create a new tree of hierarchical snapshots.