25.7.3 Shell script for terminating HiRDB

Create a shell script for terminating HiRDB (executing $PDDIR/bin/pdstop) and start this shell script when the package stops. To do this, set a shell script that terminates HiRDB inside the package control script of MC/ServiceGuard. Figure 25-47 shows the HiRDB termination processing flow.

Figure 25-47 HiRDB termination processing flow (MC/ServiceGuard)

[Figure]

Organization of this subsection
(1) Examples of a shell script for terminating HiRDB
(2) Notes

(1) Examples of a shell script for terminating HiRDB

Examples of a shell script for terminating HiRDB are shown below.

HiRDB/Single Server

#!/bin/sh
PDDIR=/HiRDB_S
PDCONFPATH=${PDDIR}/conf
SHLIB_PATH=${PDDIR}/lib
PATH=${PATH}:${PDDIR}/bin
export PDDIR PDCONFPATH SHLIB_PATH PATH
${PDDIR}/bin/pdstop -f -q>/dev/null 2>&1

Note
Specify the pdstop -f -q command to terminate HiRDB forcibly.
Executing this command may cause an error shutdown in the RDAREAs on the shared disk. If this happens, use the database recovery utility to recover the RDAREAs on the shared disk.

HiRDB/Parallel Server

#!/bin/sh
PDDIR=/HiRDB_P
PDCONFPATH=${PDDIR}/conf
SHLIB_PATH=${PDDIR}/lib
PATH=${PATH}:${PDDIR}/bin
export PDDIR PDCONFPATH SHLIB_PATH PATH
${PDDIR}/bin/pdstop -z -q>/dev/null 2>&1

Note
Specify the pdstop -z -q command to terminate HiRDB forcibly.
Executing this command may cause an error shutdown in the RDAREAs on the shared disk. If this happens, use the database recovery utility to recover the RDAREAs on the shared disk.

(2) Notes