I recently deployed a new installation at one customer with 2 linux servers and 2 Oracle SE2 databases with dbvisit StandbyMP v11 disaster recovery solution. I prepared the standby database using RMAN duplication method, and then just wanted to create the dbvisit DDC configuration using CLI command. I had to troubleshoot one error, and wanted to share quickly the solution hoping it will help you save some time if you are facing the same problem.
Problem description
I used dbvctl command to create the DDC configuration. Using the GUI generated exactly the same problem.
oracle@srv01:/u01/app/dbvisit/standbymp/oracle/ [MYDB] ./dbvctl -o setup ========================================================= Dbvisit Standby Database Technology (11.4.1) http://www.dbvisit.com ========================================================= =>dbvctl only needs to be run on the primary server. Is this the primary server? [Yes]: The following Dbvisit Database configuration (DDC) file(s) found on this server: DDC === 1) Create New DDC 2) Cancel Please enter choice [] : 1 Is this correct? [Yes]: ========================================================= Dbvisit Standby setup begins. ========================================================= The following Oracle instance(s) have been found on this server: SID ORACLE_HOME === =========== 1) MYDB /u01/app/oracle/product/19_20_0_0_RU230718_v0/ 2) Enter own ORACLE_SID and ORACLE_HOME Please enter choice [] : 1 Is this correct? [Yes]: =>ORACLE_SID will be: MYDB =>ORACLE_HOME will be: /u01/app/oracle/product/19_20_0_0_RU230718_v0/ <<<>>> PID:434403 TRACEFILE:dbvisit_install.log SERVER:srv01 ERROR_CODE:808 Database in unknown mode (94). Setup cannot proceed. >>>> Dbvisit Standby terminated <<<<
I faced following error:
ERROR_CODE:808 Database in unknown mode (94). Setup cannot proceed. >>>> Dbvisit Standby terminated <<<<
Troubleshooting
I troubleshooted dbvisit_install.log log and could find following errors:
oracle@srv01:/u01/app/dbvisit/standbymp/oracle/log/ [MYDB] cat dbvisit_install.log ... ... ... 4472 20231214 10:56:04 main::cmn_get_rooh_oraenv: ORACLE_BASE_HOME =/u01/app/oracle/product/19_20_0_0_RU230718_v0/ 4472 20231214 10:56:04 main::cmn_get_rooh_oraenv: ORACLE_BASE_CONFIG=/u01/app/oracle/product/19_20_0_0_RU230718_v0/ ... ... ... 59 20231214 10:18:36 main::ora_db_connect: connection failed:ORA-12547: TNS:lost contact (DBD ERROR: OCIServerAttach) 59 20231214 10:18:36 main::ora_exec_sql: end: error_code=12547 error=ORA-12547: TNS:lost contact (DBD ERROR: OCIServerAttach) ... ... ...
It seems dbvisit could not access the database through the Oracle Net Services.
But I checked the listener configuration, and the database services were correctly registered in the listener. I could even successfully test a connection to the database through the listener using sqlplus.
Solution
Doing more troubleshooting, I could realise that the problem was coming from the oratab. The Oracle SID was configured with appropriate ORACLE_HOME but having a “/” at the end.
oracle@srv01:/u01/app/dbvisit/standbymp/oracle/log/ [MYDB] cat /etc/oratab # # This file is used by ORACLE utilities. It is created by root.sh # and updated by either Database Configuration Assistant while creating # a database or ASM Configuration Assistant while creating ASM instance. # A colon, ':', is used as the field terminator. A new line terminates # the entry. Lines beginning with a pound sign, '#', are comments. # # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:: # # The first and second fields are the system identifier and home # directory of the database respectively. The third field indicates # to the dbstart utility that the database should , "Y", or should not, # "N", be brought up at system boot time. # # Multiple entries with the same $ORACLE_SID are not allowed. # # MYDB:/u01/app/oracle/product/19_20_0_0_RU230718_v0/:Y
I modified the oratab accordingly on both primary and standby side:
oracle@srv01:/u01/app/dbvisit/standbymp/oracle/log/ [MYDB] vi /etc/oratab oracle@srv01:/u01/app/dbvisit/standbymp/oracle/log/ [MYDB] cat /etc/oratab # # This file is used by ORACLE utilities. It is created by root.sh # and updated by either Database Configuration Assistant while creating # a database or ASM Configuration Assistant while creating ASM instance. # A colon, ':', is used as the field terminator. A new line terminates # the entry. Lines beginning with a pound sign, '#', are comments. # # Entries are of the form: # $ORACLE_SID:$ORACLE_HOME:: # # The first and second fields are the system identifier and home # directory of the database respectively. The third field indicates # to the dbstart utility that the database should , "Y", or should not, # "N", be brought up at system boot time. # # Multiple entries with the same $ORACLE_SID are not allowed. # # MYDB:/u01/app/oracle/product/19_20_0_0_RU230718_v0:Y
And could then successfully create the DDC configuration:
oracle@srv01:~/ [MYDB] cd /u01/app/dbvisit/standbymp/oracle/ oracle@srv01:/u01/app/dbvisit/standbymp/oracle/ [MYDB] ./dbvctl -o setup ========================================================= Dbvisit Standby Database Technology (11.4.1) http://www.dbvisit.com ========================================================= =>dbvctl only needs to be run on the primary server. Is this the primary server? [Yes]: The following Dbvisit Database configuration (DDC) file(s) found on this server: DDC === 1) Create New DDC 2) Cancel Please enter choice [] : 1 Is this correct? [Yes]: ========================================================= Dbvisit Standby setup begins. ========================================================= The following Oracle instance(s) have been found on this server: SID ORACLE_HOME === =========== 1) MYDB /u01/app/oracle/product/19_20_0_0_RU230718_v0 2) Enter own ORACLE_SID and ORACLE_HOME Please enter choice [] : 1 Is this correct? [Yes]: =>ORACLE_SID will be: MYDB =>ORACLE_HOME will be: /u01/app/oracle/product/19_20_0_0_RU230718_v0 ------------------------------------------------------------------------------ Enter the primary server name. Note: The hostname is case sensitive on UNIX based systems. =>SOURCE is [srv01]: Your input: srv01 Is this correct? [Yes]: Choice is srv01 ------------------------------------------------------------------------------ Please enter a filesystem directory that Dbvisit Standby use to store (archive) log files. This directory is not the same as the database recovery area or archive destinations and should not be located in these areas. The ARCHSOURCE directory is located on the primary server and will become the ARCHDEST location when the primary database is converted to a standby database during a Graceful Switchover operation. This directory will ONLY contain (archive) log files related to this database. It should not contain any other (non archive log) files. Please ensure that this directory exists on =>ARCHSOURCE is [/u01/app/oracle/dbvisit_arch/MYDB_SITE1]: /u90/dbvisit_arch/MYDB Your input: /u90/dbvisit_arch/MYDB Is this correct? [Yes]: Choice is /u90/dbvisit_arch/MYDB ------------------------------------------------------------------------------ Specify the DBVNET port number on the primary server. If unsure leave at default =>NETPORT is [7890]: Your input: 7890 Is this correct? [Yes]: Choice is 7890 ------------------------------------------------------------------------------ Enter the standby database hostname. If the standby database will be Oracle RAC enabled: Enter the the Virtual Hostname (linked to a Virtual IP) for standby database. This virtual hostname is attached to a VIP that will be able to move between the RAC nodes. Dbvisit Standby will only run on the server where this virtual hostname (VIP) resource is running. The Virtual Hostname (and VIP) should be configured as a resouce in clusterware and must be enabled and started on one of the nodes before yo continue with the setup. If you are not using a Virtual Hostname (Highly Recommended), Dbvisit Standby can only be configured to run on one dedicated node in the RAC configuration - specify the hosts name here if you do not have a Virtual Hostname (attached to VIP) for the cluster configured. For non-RAC configurations specify the standby database server name here. =>DESTINATION is []: srv02 Your input: srv02 Is this correct? [Yes]: Choice is srv02 ------------------------------------------------------------------------------ Specify the DBVNET port number on the standby server. If unsure leave at default =>NETPORT_DR is [7890]: Your input: 7890 Is this correct? [Yes]: Choice is 7890 ------------------------------------------------------------------------------ Enter Dbvisit Standby installation directory on the standby server =>DBVISIT_BASE_DR is [/u01/app/dbvisit/standbymp]: Your input: /u01/app/dbvisit/standbymp Is this correct? [Yes]: Choice is /u01/app/dbvisit/standbymp ------------------------------------------------------------------------------ Enter ORACLE_HOME directory on the standby server =>ORACLE_HOME_DR is [/u01/app/oracle/product/19_20_0_0_RU230718_v0]: Your input: /u01/app/oracle/product/19_20_0_0_RU230718_v0 Is this correct? [Yes]: Choice is /u01/app/oracle/product/19_20_0_0_RU230718_v0 ------------------------------------------------------------------------------ Enter DB_UNIQUE_NAME on the standby server =>DB_UNIQUE_NAME_DR is [MYDB_SITE1]: MYDB_SITE2 Your input: MYDB_SITE2 Is this correct? [Yes]: Choice is MYDB_SITE2 ------------------------------------------------------------------------------ Please enter the directory where Dbvisit Standby will transfer the (archive) log files to on standby server. This directory is not the same as the database recovery area or archive destinations and should not be located in these areas. This directory should ONLY contain (archive) log files related to this database. It should not contain any other (non archive log) files. Please ensure that this directory exists on the standby server =>ARCHDEST is [/u90/dbvisit_arch/MYDB]: Your input: /u90/dbvisit_arch/MYDB Is this correct? [Yes]: Choice is /u90/dbvisit_arch/MYDB ------------------------------------------------------------------------------ Enter ORACLE_SID on the standby server =>ORACLE_SID_DR is [MYDB]: Your input: MYDB Is this correct? [Yes]: Choice is MYDB ------------------------------------------------------------------------------ Enter ASM instance name on the standby server, if your standby is using ASM. If you are not using ASM on the standby or standby is ACFS leave the value null. =>ORACLE_SID_ASM_DR is []: Is this correct? [Yes]: Choice is null ------------------------------------------------------------------------------ Please specify the name of the Dbvisit Database configuration (DDC) file. The DDC file is a plain text file that contains all the Dbvisit Standby settings. =>ENV_FILE is [MYDB_SITE1]: MYDB Your input: MYDB Is this correct? [Yes]: Choice is MYDB ------------------------------------------------------------------------------ Provide license key. =>LICENSE_KEY is []: *****-*****-*****-*****-*****-*****-***** Your input: *****-*****-*****-*****-*****-*****-***** Is this correct? [Yes]: Choice is *****-*****-*****-*****-*****-*****-***** ------------------------------------------------------------------------------ Below are the list of configuration variables provided during the setup process: Configuration Variable Value Provided ====================== ============== ORACLE_SID MYDB ORACLE_HOME /u01/app/oracle/product/19_20_0_0_RU230718_v0 SOURCE srv01 ARCHSOURCE /u90/dbvisit_arch/MYDB NETPORT 7890 DESTINATION srv02 NETPORT_DR 7890 DBVISIT_BASE_DR /u01/app/dbvisit/standbymp ORACLE_HOME_DR /u01/app/oracle/product/19_20_0_0_RU230718_v0 DB_UNIQUE_NAME_DR MYDB_SITE2 RAC_DR N ARCHDEST /u90/dbvisit_arch/MYDB ORACLE_SID_DR MYDB ENV_FILE MYDB LICENSE_KEY *****-*****-*****-*****-*****-*****-***** Are these variables correct? [Yes]: >>> Dbvisit Database configuration (DDC) file MYDB created. >>> Dbvisit Database repository (DDR) MYDB created. Repository Version 11.0 Software Version 11.0 Repository Status VALID >>> Created a matching configuration in the Control Center. PID:5554 TRACE:dbvisit_install.log
Conclusion
Make sure your ORACLE_HOME value in the oratab is not finishing with a “/”. I was already facing the same problem with Oracle Data Guard configuration having DGMGRL static entry in the listener that were configured with a ORACLE_HOME value finishing with a “/”.