Scalable Database Server, HiRDB Version 8 System Operation Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
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]](FIGURE/ZU250180.GIF)
- 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.
- The package is also stopped when system switchover is being performed erroneously. In such a case, HiRDB is terminated forcibly so that the systems can be switched immediately and the standby system can restart HiRDB in order to resume operations.
- A termination mode, such as normal termination or planned termination, cannot be specified in a shell script.
- To terminate HiRDB normally, first use the pdstop command to terminate HiRDB, and then deactivate the package.
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.