Changing the database server type

You can change the type of either the primary or the secondary database server.

You can change the type of either the primary or the secondary database server.

You can change the database server type from secondary to standard only if HDR is turned off on the secondary database server. HDR is turned off when the data replication connection to the primary database server breaks or data replication fails on the secondary database server. When you take the standard database server offline and bring it back online, it does not attempt to connect to the other database server in the replication pair.

Use the following commands to switch the type:
  • hdrmksec.[sh|bat] and hdrmkpri.[sh|bat] scripts

To switch the database server type using hdrmkpri and hdrmksec scripts:

  1. Shut down the primary database server (ServerA): onmode -ky
  2. With the secondary database server (ServerB) online, run the hdrmkpri.sh script on UNIX™ or hdrmkpri.bat script on Windows™.Now ServerB is a primary database server.
  3. For ServerA, run the hdrmksec.sh script on UNIX or hdrmksec.bat script on Windows.Now ServerA is a secondary database server.
  4. Bring ServerB (primary database server) online.

The following commands can also be used to switch the server type:

  1. Change ServerA to the primary server by running the following command:
    onmode -d make primary ServerA
    This command makes ServerA the primary server, and redirects any other secondary servers in the cluster to point to the new primary server. The command also shuts down the old HDR primary (ServerB) because only a single primary server can exist in a high-availability environment.
  2. Initialize ServerB as the HDR secondary server by running the following command:
    • On UNIX systems:
      $ONEDB_HOME/bin/hdrmksec.sh ServerB
    • On Windows systems:
      hdrmksec.bat ServerB