Importing Protected Database Metadata into the Recovery Appliance Catalog

To use Recovery Appliance for data protection of your protected databases, metadata for these protected databases must be stored in the Recovery Appliance catalog and not in an RMAN recovery catalog. Existing backup metadata that is currently stored in an RMAN recovery catalog can be imported into the Recovery Appliance catalog. It is recommended that you import your existing recovery catalogs into the Recovery Appliance catalog.

An RMAN recovery catalog can store metadata for one or more protected databases. While importing an RMAN recovery catalog into the Recovery Appliance catalog, you can import metadata related to only some databases or import all the metadata in the RMAN recovery catalog.

Note that importing your existing catalog to the Recovery Appliance catalog copies the backup metadata only. The existing backups themselves are not copied to the Recovery Appliance during catalog import. If required, you must separately copy existing backups as described in "Migrating Existing Backups to Recovery Appliance".

Steps to Import Protected Database Metadata Into Recovery Appliance

  1. Complete the preparation steps described in "Preparing to Import an RMAN Recovery Catalog into Recovery Appliance".

  2. Import the RMAN recovery catalog that stores metadata for the protected database that is being migrated to the Recovery Appliance as described in "Importing Protected Database Metadata Using the IMPORT CATALOG Command".

Preparing to Import an RMAN Recovery Catalog into Recovery Appliance

Before importing a protected database's metadata from an RMAN recovery catalog into the Recovery Appliance catalog, some actions must be performed both on the protected database and on the Recovery Appliance.

  1. Perform the following steps on the Recovery Appliance:

    1. Create a Recovery Appliance user that will be used by the protected database whose metadata is being migrated. The protected database authenticates with the Recovery Appliance using this Recovery Appliance user.

    2. Create a protection policy that will be used by the protected database whose metadata is being migrated.

      You can also use an existing protection policy, if it meets the requirements for the protected database being migrated.

    3. Enroll the protected database whose metadata is being migrated with the Recovery Appliance.

    See Also:

    Zero Data Loss Recovery Appliance Administrator's Guide for more information about performing these steps

  2. Perform the following steps on the protected database:

    1. If the source RMAN recovery catalog is not an contained in an Oracle 12c Release 1 database, then upgrade the recovery catalog database to Oracle 12c Release 1.

      See Also:

      Oracle Database Upgrade Guide for information about upgrading a database to Oracle Database 12c Release 1 (12.1).

    2. Install the Recovery Appliance backup module that creates the shared library required to transfer backup data to the Recovery Appliance.

      Installing the backup module will create the Oracle wallet that contains credentials used to authenticate the protected database with the Recovery Appliance.

    3. Connect as TARGET to the protected database and as CATALOG to the RMAN recovery catalog that stores metadata for the protected database.

      The following example connects as TARGET to the protected database and as CATALOG to the source RMAN recovery catalog. The owner of the RMAN recovery catalog is rman_cat11 and dbrcat11 is the net service name of the RMAN recovery catalog database. Replace rmancat11_pswd with the password of the rman_cat11 user.

      $ rman target / catalog rman_cat11/rmancat11_pswd@dbrcat11
      
    4. Ensure that no backups from the protected database are being created to the RMAN recovery catalog.

      The following commands connect to SQL*Plus as the owner of the source RMAN recovery catalog and query for backups that are being created to the RMAN recovery catalog rman_cat11.

      $ sqlplus rman_cat11/rmancat11_pswd@dbrcat11
      SQL> SELECT username, module 
                FROM v$session
                WHERE username = 'RMAN_CAT11';
      

      This query should not return any results. Rows returned indicate a connection for what could be an ongoing backup or restore operation. If rows are returned, verify that there are no connections, then retry the query.

    5. Determine the number of backup pieces contained in the catalog for the protected database.

      The following example lists the number of backup pieces for the protected database MY_PTDB:

      SQL> SELECT db_name, COUNT(*)
                FROM rc_backup_piece_details
                WHERE db_name='MY_PTDB';
      
    6. Exit SQL*Plus, and reconnect as TARGET to the protected database and as CATALOG to the source RMAN recovery catalog to verify that the backups in the recovery catalog are valid and can be used for a successful recovery operation.

      $ rman target / catalog rman_cat11/rmancat11_pswd@dbrcat11
      

      You can either verify the backups by restoring them or by using the RESTORE ... VALIDATE command.

      See Also:

      Oracle Database Backup and Recovery Reference for details about using the RESTORE ... VALIDATE command

    7. Connect to SQL*Plus as the owner of the source RMAN recovery catalog and run the dbmsrmansys.sql script. This script grants additional privileges that are required for the RECOVERY_CATALOG_OWNER role.

      $ sqlplus rman_cat11/rmancat11_pswd@dbrcat11 
      SQL> $ORACLE_HOME/rdbms/admin/dbmsrmansys.sql
      SQL> exit
      

      The rman_cat11 user owns the RMAN recovery catalog and the net service name of the recovery catalog database is dbrcat11. Replace rmancat11_pswd with the password of the rman_cat11 user.

    8. On the Recovery Appliance, start an RMAN session and connect to the Recovery Appliance as TARGET using the RASYS user and to the source RMAN recovery catalog as CATALOG.

      The following command connects as TARGET to the Recovery Appliance and as CATALOG to the source RMAN recovery catalog.

      $ 	rman target rasys/rasys_pswd
      RMAN> CONNECT CATALOG rman_cat11/rmancat11_pswd@dbrcat11
      

      RASYS is the owner of the Recovery Appliance catalog. Replace rasys_pswd with the password of the rasys user. The owner of the source RMAN recovery catalog is rman_cat11 and the service name of the recovery catalog database is dbrcat11. Replace rmancat11_pswd with the password of the rman_cat11 user.

      Note:

      The UPGRADE CATALOG has to be performed from a different ORACLE_HOME that has the proper database version. For RA23, do the upgrade catalog from a separate Database 23ai version.
    9. Upgrade the source RMAN recovery catalog to the new release. The UPGRADE CATALOG command needs to be entered twice for confirmation.

      • UPGRADE CATALOG;
        UPGRADE CATALOG;
        
    10. Repeat Steps 2.d through 2.f on the upgraded source RMAN recovery catalog to verify that the upgraded catalog is fine and can be used to recover the protected database.

Importing Protected Database Metadata Using the IMPORT CATALOG Command

Use the RMAN IMPORT CATALOG command to import metadata from an RMAN recovery catalog into the Recovery Appliance catalog.

The version of the source RMAN recovery catalog schema must be equal to the current version of the Recovery Appliance recovery catalog schema (12.1.0.2). Upgrade the source recovery catalog schema to 12.1.0.2 if needed.

To import protected database metadata into the Recovery Appliance catalog:

  1. Start RMAN and connect as CATALOG using the rasys user. Note that rasys is the owner of the Recovery Appliance catalog.

    The following command (replace ra_pswd with the password of the rasys user) connects as CATALOG to the Recovery Appliance catalog. The Single Client Access Name (SCAN) of the Recovery Appliance is ra-scan and the service name of the Recovery Appliance metadata database is zdlra5. rasys is the Recovery Appliance catalog owner.

    # 	rman CATALOG rasys/ra_pswd@ra-scan:1521/zdlra5
    
  2. Import the source RMAN recovery catalog into the Recovery Appliance catalog. The credentials of the source RMAN recovery catalog are provided by the protected database administrator.

    Use the NO UNREGISTER clause to specify that the protected database must not be unregistered from the source RMAN recovery catalog that it is currently using.

    The following command imports all the metadata contained in the source RMAN recovery catalog that is owned by the user rman_cat11 (replace rmancat11_pswd with the password of the rman_cat11 user).

    IMPORT CATALOG rman_cat11/rmancat11_pswd@dbrcat11 NO UNREGISTER;
    

    The following command imports the metadata for the protected database with database name MY_PTDB contained in the source RMAN recovery catalog that is owned by the user rman_cat11 (replace rmancat11_pswd with the password of the rman_cat11 user).

    IMPORT CATALOG rman_cat11/rmancat11_pswd@dbrcat11 
         DB_NAME 'MY_PTDB' NO UNREGISTER;
    
  3. Verify that all the backup pieces are included in the Recovery Appliance catalog by querying the RC_BACKUP_PIECE_DETAILS view.

    Compare the number of rows returned by the query in Step 2.e of "Preparing to Import an RMAN Recovery Catalog into Recovery Appliance" with the output of this step. The number of backup pieces returned by both queries must be the same.

See Also:

Oracle Database Backup and Recovery Reference for information about the IMPORT CATALOG command