Oracle

Before configuring disaster recovery (DR) services, check the database environments of the production end and the DR end where Oracle databases reside, and the storage end environment. If the database environments do not meet requirements, modify database configurations.

Common Check Items

The following configuration items must be checked and configured on databases at both the production and DR ends.

  1. If the host where the Oracle database resides runs Linux, check the UDEV disk mapping mode.

    When UDEV is used to map disks, the restrictions on disk mapping modes are as follows:

    • Only disk partitions can be used for UDEV disk mapping.
    • When UDEV is used to map DATA and REDO disks, use UDEV disks to serve as the member disks of the DATA and REDO disk group.
    • The UDEV configuration rules at the production and DR ends must be in the 99-oracle-asmdevices.rules rule file (save path: /etc/udev/rules.d).

      Two UDEV disk mapping modes are available. The following uses SUSE 12SP5 (disks DATA and REDO involved) as an example to describe how to configure both UDEV disk mapping modes:

      • Naming disks
        KERNEL=="sd*",ENV{ID_SERIAL}=="3622334410055667711fc7ffd00000113",SYMLINK+="oracle/redo_102",OWNER="grid",GROUP="asmadmin",MODE="0660"
        KERNEL=="sd*",ENV{ID_SERIAL}=="3622334410055667711fc417d0000010f",SYMLINK+="oracle/data_101",OWNER="grid",GROUP="asmadmin",MODE="0660"

      The KERNEL parameter must be specified using wildcards (for example, KERNEL=="sd*1" or KERNEL=="sd?1") and cannot be a fixed device partition name (for example: KERNEL="sda"). Otherwise, UDEV configuration rules cannot take effect.

  2. Check the authentication mode of the database.

    During the creation of the Oracle protected group, you can specify different authentication modes for different protected objects and RAC hosts. Currently, database authentication and operating system authentication are supported. Table 1 describes the configuration details.

    Table 1 Configuration requirements for authentication modes

    Authentication Mode

    Requirements

    Database authentication

    Authentication modes at the production and DR ends must be the same.

    In a cluster, authentication modes of all hosts must be the same.

    During protected group creation, authentication mode specified on the eReplication must be the same as that used by the database.

    Operating system authentication

    In an Oracle RAC cluster deployed on ASM, the operating system authentication must be enabled so that the cluster at the DR end can be started normally upon DR.

    For Oracle single-instance databases deployed on ASM, the following requirements must be met:

    For Unix-like operating systems, operating system authentication must be enabled if the password files of Oracle databases are configured to be saved in the ASM disk group. Alternatively, you can save the password files on the local file system. If neither method is adopted, the recovery plan corresponding to the Oracle protected group cannot be executed for testing, planned migration, and fault recovery.

  3. Check OPEN_MODE of the database.

    When creating an Oracle protected group, you can select OPEN_MODE for the database.
    Table 2 Setting OPEN_MODE

    Configuration Item

    Description

    OPEN_MODE

    • The values of OPEN_MODE at the production and DR ends must be the same.
    • The value of OPEN_MODE on each host in the same cluster must be the same.

    By default, OPEN_MODE supported by Agentless is READ ONLY WITH APPLY. To change OPEN_MODE, run the following command (the Agentless configuration of all nodes in the production and DR clusters needs to be modified):

    1. Run the vi /opt/xxxx/Agentless/lib/comm_config.sh command to go to the comm_config.sh configuration file, where xxxx indicates the customized Agentless installation directory.
    2. Search for OPEN_MODE=1, change it to OPEN_MODE=0, save the file, and exit.

Production End

  1. Check the running mode of databases at the production end.

    The eReplication Agentless can ensure consistency between Oracle databases only when the databases are running in archive mode.

    • To configure the running mode of an Oracle database running a Linux operating system, perform the following steps:
      1. Run the sqlplus command to log in to the Oracle database. In the example provided here, the user name is sys, the password is oracle, and the instance name is verify.

        The following shows the command format and output:

        [oracle@rhcs218 ~]$ sqlplus /nolog 
         
        SQL*Plus: Release 11.2.0.3.0 - Production on Fri Jun 26 10:30:34 2020 
         
        Copyright (c) 1982, 2002, Oracl.  All rights reserved. 
         
        SQL> conn sys/oracle@verify as sysdba 
        Connected.
      2. Run the archive log list command to check whether the database is in archive mode.

        The following shows the command format and output:

        SQL> archive log list; 
        Database log mode             No Archive Mode 
        Automatic archival            Enabled 
        Archive destination           +REDO 
        Oldest online log sequence    75 
        Next log sequence to archive  76   
        Current log sequence          76     
    • If Database log mode is Archive Mode, the database is in archive mode.
    • If Database log mode is No Archive Mode, follow instructions in related Oracle database documents to change the operation mode to archive.
    • Archive destination must be in the disk group planned for the log synchronous replication DR solution.

  2. Check the database files at the production end.

    Check that the data files, log files, and control files of a database are stored on LUNs. If those files are not stored on LUNs, DR cannot be performed for the database. You are advised to store temporary tablespaces on the same LUN where data files, log files, or control files resides or store temporary tablespaces a LUN different from the LUNs where other database files are stored.

DR End

Check the database environment of the ADG DR end and the test host at the DR end. Table 3 lists the specific environment requirements.

If the database environment of the test host at the DR site is different from that at the production site, ensure that the database environment of the test host at the DR site is the same as that at the production site.

Table 3 Database environment requirements of the ADG DR end and test host at the DR end

Check Item

Requirements

Oracle installation

Oracle databases on the DR and production ends must run the same operating system and of the same version.

Versions of Oracle databases on the DR and production ends must be the same.

The installation location of Oracle databases on the DR end must be consistent with that on the production end.

Database

The database authentication modes on the DR and production ends must be the same.

Names, user names, and passwords of Oracle databases on the DR and production ends must be the same.

Oracle RAC

scan name of SCAN-IP on the production end must be consistent with that on the production end.

Storage End

In the synchronous replication (SAN) DR scenario, if multiple archive logs are configured for a database, at least one archive log must use storage resources that are configured with remote replication or consistency group. In addition, the consistency group must be a different one from that of data files, control files, and online log files.

Table 4 describes the storage requirements of disaster recovery solutions.

Table 4 Requirements of disaster recovery solutions on storage

Technology

Restriction and Requirement

Synchronous replication (SAN)

  • When DR is implemented based on storage array remote replication, consistency replication relationships must be set up between storage arrays used by applications.
    • If storage arrays are used for protection, remote replication relationships must be set up for LUNs used by applications and the status of remote replication must be normal.
    • If multiple LUNs are used, related remote replications must be added to one consistency group. If the database uses only one LUN, the LUN does not need to be added to a consistency group.
    • If the storage is flash storage, automatic host adding and storage mapping are provided. Ensure that the storage is connected to hosts' initiators normally. In this manner, the system can automatically create hosts, host groups, LUN groups, and mapping views on the storage.
    • If the DR storage is flash storage, the DR host can belong to only one host group that belongs to only one mapping view. Moreover, the storage LUN used by protected applications and its corresponding remote replication secondary LUN must belong to one LUN group, and the LUN group must reside in the same mapping view as the host group.
  • After the application environment is set up at the DR site, you need to unmap the test host at the DR site from the storage LUNs or volumes where the application data files, control files, and log files are located. The ADG DR host cannot be unmapped.
  • Check whether all file systems used by the Oracle database to be recovered are unmounted from the DR host.
  • On DeviceManager, check that secondary LUNs corresponding to remote replication used by production databases are not mapped to any host, host group, or mapping view.

Copyright © Huawei Technologies Co., Ltd.