Importing Existing Oracle DDC

1. Introduction

In this section, we will show you how to import existing Oracle DDC file into v11 dbvcontrol dashboard. DDC file contains complete configuration for a pair of Primary and Standby Oracle database synchronization. Default location of DDC file is following in version 11:

$DBVISIT_BASE/standbymp/oracle/conf/dbv_PROD.env

In versions 8,9,10:

$DBVISIT_BASE/standby/conf/dbv_PROD.env

The string “PROD” is the actual DDC name and DBVISIT_BASE is typically /usr/dbvisit on Linux and C:\Program Files\Dbvisit on Windows.

There are various situations when you can use this process such as when re-installing v11 Dbvisit from the scratch or even manually importing older version DDC file after failed or incomplete upgrade. Oracle DDC file is standalone entity and can be used to quickly add existing standby database to you dbvcontrol dashboard.

2. Pre-checks

In order to successfully import DDC file following conditions must be fulfilled:

  • The server roles must be correct

  • The hostnames specified in DDC file must match hostnames configured in primary and standby dbvagentmanager (case sensistive, domain sensitive)

  • There must be no old files accociated with the DDC file we intend to import inside Dbvisit base on primary and standby

2.1 Server Roles Check

We assume that DDC file we want to import is for now placed in /tmp directory

We need to find out hostnames used by the DDC file. This can be checked by running following command:

$ cat /tmp/dbv_SLASH.env | egrep -i '^SOURCE = |^DESTINATION = ' SOURCE = czlin0231 DESTINATION = czlin0232

SOURCE=primary server, DESTINATION=standby server

If the server roles are NOT correct, we recommend to abort the import process and create new DDC from the scratch. Roles not being correct indicate mismatch between DDC and your environment and you can potentially introduce many errors or even endanger your production database. Do NOT manually edit the DDC file to force the match.

If server roles are correct, proceed further.

2.2 Dbvagentmanager configuration check

Hostnames in the DDC file must match the installed dbvagenmanager configuration on primary and standby:

$ cat /tmp/dbv_SLASH.env | egrep -i '^SOURCE = |^DESTINATION = ' SOURCE = czlin0231 DESTINATION = czlin0232 #primary host $ cat /usr/dbvisit/standbymp/conf/dbvagentmanager.ini | grep Host HostAddress = czlin0231 #standby host $ cat /usr/dbvisit/standbymp/conf/dbvagentmanager.ini | grep Host HostAddress = czlin0232

The hostnames must be identical - FQDN matters and case matters as well. If you see any differences in letter case or domain, edit the DDC file to get the match. Don’t edit the dbvagentmanager.ini file.

2.3 Old associated files check

You need to check for old files on primary & standby server

  • Directory /usr/dbvisit/standbymp/oracle/conf must not contain old DDC file:

$ ls -l /usr/dbvisit/standbymp/oracle/conf/dbv_SLASH.env ls: cannot access '/usr/dbvisit/standbymp/oracle/conf/dbv_SLASH.env': No such file or directory
  • Directory /usr/dbvisit/standbymp/oracle/conf must not contain old DDC sqlite repository either. The filename or repository is <lowercase db_name>.db:

$ cat /tmp/dbv_SLASH.env | grep DB_NAME # DB_NAME - Database db_name. Please DO NOT edit! DB_NAME = SLASH $ ll /usr/dbvisit/standbymp/oracle/conf/slash.db ls: cannot access '/usr/dbvisit/standbymp/oracle/conf/slash.db': No such file or directory
  • Directory /usr/dbvisit/standbymp/oracle must not contain old hosts file. Name of hosts file can be read from DDC file:

$ cat /tmp/dbv_SLASH.env | egrep 'HOSTNAME_CMD =' | grep -v \# HOSTNAME_CMD = dbvhost_slash.sh $ ls -l /usr/dbvisit/standbymp/oracle/dbvhost_slash.sh ls: cannot access '/usr/dbvisit/standbymp/oracle/dbvhost_slash.sh': No such file or directory

If you’re in SEHA or RAC environment then it’s exactly the opposite: you MUST manually create the hosts file, if it’s not already existing. Create empty file as per HOSTNAME_CMD parameter and include following line:

echo “hostname”

Where hostname string is the value of SOURCE parameter found in your DDC file.

3. Import DDC file

3.1 Import DDC file into dashboard

After prechecks afe successfully completed, we can import the DDC file into controlcenter. Copy the DDC file into DDC directory:

$ cp /tmp/dbv_SLASH.env /usr/dbvisit/standbymp/oracle/conf

And use the GUI to import:

image-20240212-123331.png
image-20240212-123520.png
image-20240212-123751.png

After import, the DDC will be visible in the dashboard:

image-20240212-123956.png

Successful import is recognized by Primary Database having ONLINE status and standby database havin RECOVERING status.

3.2 License update (optional)

This step is valid only if you imported pre-v11 DDC file. Pre-v11 license will be unusable. This is indicated by a warning, like seen here:

image-20240212-124027.png

To adjust the license please see Standby MultiPlatform Licenses | 2. Oracle Licensing

3.3 Check synchronization

You should be able to directly enable / continue synchronization with automated standby update as described here:

Miscellaneous Oracle Functions | 1. Scheduling archive log send and apply

In some situations (for example when primary is out of sync with standby for long time) you may need to run incremental backup sync before enabling the automated standby update:

Oracle: Synchronize standby