Nonstop Database, HiRDB Version 9 UAP Development Guide
This subsection provides notes concerning UAP execution.
To execute UAPs, you must specify the LANG environment variable, or PDLANG or PDCLTLANG in the client environment definition according to the HiRDB server's character code classification (specified by the pdsetup command in the UNIX edition and the pdntenv command in the Windows edition). If the HiRDB server and HiRDB client use different character code classifications, an error occurs during UAP execution. The following table shows the values of LANG and PDLANG for each platform.
Table 8-24 Values of LANG and PDLANG for each platform
| Character encoding type#1 | HP-UX | Solaris | AIX | Linux | |
|---|---|---|---|---|---|
| lang-c | LANG | C | C | C | C |
| PDLANG | -- | -- | -- | -- | |
| sjis | LANG | ja_JP.SJIS | ja_JP.PCK | Ja_JP | Any#2 |
| PDLANG | -- | -- | -- | SJIS | |
| ujis | LANG | ja_JP.eucJP | ja | ja_JP | ja_JP.eucJP#3 |
| PDLANG | -- | -- | -- | -- | |
| chinese | LANG | chinese-s | Any#2 | Any#2 | Any#2 |
| PDLANG | CHINESE | CHINESE | CHINESE | CHINESE | |
| utf-8 | LANG | Any#2 | Any#2 | Any#2 | Any#2 |
| PDLANG | UTF-8 | UTF-8 | UTF-8 | UTF-8 | |
| chinese-gb18030 | LANG | Any#2 | Any#2 | Any#2 | Any#2 |
| PDLANG | CHINESE-GB18030 | CHINESE-GB18030 | CHINESE-GB18030 | CHINESE-GB18030 | |
For executing a UAP, add $PDDIR/client/lib to SHLIB_PATH. If you are using a different platform, replace SHLIB_PATH with the corresponding environment variable for that platform.
If the HiRDB system includes a recovery-unnecessary front-end server and it processes a UAP that uses the X/Open XA interface to connect to the recovery-unnecessary front-end server, it will not be possible to execute that UAP's SQL statements. In such a case, you must specify the PDFESHOST and PDSERVICEGRP client environment definitions and connect to a front-end server that is not a recovery-unnecessary front-end server.
Because of changes in the socket security specifications in Windows Server 2003, Windows Vista, Windows Server 2008, and Windows 7, a receive port already in use by another program might be assigned to a communication socket acquired by the HiRDB client. If a receive port that is already in use is assigned, the HiRDB server's message when connection is established is sent to the other program. As a result, the HiRDB client does not receive the message and the KFPA11732-E error (receive timeout) occurs. For this reason, it is important to take preventive measures to ensure that a receive port will not be duplicated when UAPs are executed in a Windows Server 2003 or later environment.
Tables 8-25 and 8-26 show the conditions that result in receive port duplication and the corrective measures to be taken in Windows Server 2003 or later.
Table 8-25 Conditions resulting in duplicate receive ports and corrective measures (1/2)
| Client that starts later | Client that starts first | |||||||
|---|---|---|---|---|---|---|---|---|
| Library version earlier than 08-03 | Library version 08-03 or later | |||||||
| PDCLTBINDLOOPBACKADDR=YES | PDCLTBINDLOOPBACKADDR=NO | |||||||
| PDCLTRCVPORT specified | PDCLTRCVPORT omitted | PDCLTRCVPORT specified | PDCLTRCVPORT omitted | PDCLTRCVPORT specified | PDCLTRCVPORT omitted | |||
| Library version earlier than 08-03 | PDCLTRCVPORT specified | -- | -- | -- | -- | -- | -- | |
| PDCLTRCVPORT omitted | -- | -- | -- | -- | -- | D1 | ||
| Library version 08-03 or later | PDCLTBINDLOOPBACKADDR=YES | PDCLTRCVPORT specified | -- | -- | -- | -- | -- | -- |
| PDCLTRCVPORT omitted | -- | -- | -- | -- | -- | -- | ||
| PDCLTBINDLOOPBACKADDR=NO | PDCLTRCVPORT specified | -- | -- | -- | -- | -- | -- | |
| PDCLTRCVPORT omitted | -- | D1 | -- | -- | -- | -- | ||
| Type 4 JDBC driver | PDCLTBINDLOOPBACKADDR=YES | PDCLTRCVPORT specified | -- | -- | -- | -- | -- | -- |
| PDCLTRCVPORT omitted | -- | -- | -- | -- | -- | D1 | ||
| PDCLTBINDLOOPBACKADDR=NO | PDCLTRCVPORT specified | -- | -- | -- | -- | -- | -- | |
| PDCLTRCVPORT omitted | -- | D1 | -- | D1 | -- | D1 | ||
Table 8-26 Conditions resulting in duplicate receive ports and corrective measures (2/2)
| Client that starts later | Client that starts first, HiRDB server, or other program | ||||||
|---|---|---|---|---|---|---|---|
| Type 4 JDBC driver | HiRDB server, or other program | ||||||
| PDCLTBINDLOOPBACKADDR=YES | PDCLTBINDLOOPBACKADDR=NO | ||||||
| PDCLTRCVPORT specified | PDCLTRCVPORT omitted | PDCLTRCVPORT specified | PDCLTRCVPORT omitted | ||||
| Library version earlier than 08-03 | PDCLTRCVPORT specified | -- | -- | -- | -- | -- | |
| PDCLTRCVPORT omitted | -- | -- | -- | D1 | D2 | ||
| Library version 08-03 or later | PDCLTBINDLOOPBACKADDR=YES | PDCLTRCVPORT specified | -- | -- | -- | -- | -- |
| PDCLTRCVPORT omitted | -- | -- | -- | D1 | D2 | ||
| PDCLTBINDLOOPBACKADDR=NO | PDCLTRCVPORT specified | -- | -- | -- | -- | -- | |
| PDCLTRCVPORT omitted | -- | D1 | -- | D1 | D2 | ||
| Type 4 JDBC driver | PDCLTBINDLOOPBACKADDR=YES | PDCLTRCVPORT specified | -- | -- | -- | -- | -- |
| PDCLTRCVPORT omitted | -- | -- | -- | D1 | D2 | ||
| PDCLTBINDLOOPBACKADDR=NO | PDCLTRCVPORT specified | -- | -- | -- | -- | D2 | |
| PDCLTRCVPORT omitted | -- | D1 | -- | D1 | D2 | ||
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.