Nonstop Database, HiRDB Version 9 UAP Development Guide
For the operation mode in which a UAP under OpenTP1 is used as the client, specify the client environment definitions in the system service definitions for OpenTP1. The environment variables are specified in the following OpenTP1 definitions:
The table below shows the OpenTP1 definitions in which the environment variables are specified.
The putenv format is used to specify environment variables.
Table 6-21 OpenTP1 definitions in which the environment variables are specified
Environment variable | System environment definition | Transaction service definition | User service default definition | User service definition |
---|---|---|---|---|
HiRDB_PDHOST#9 | M#1 | N | N | N |
HiRDB_PDNAMEPORT#9 | M#2 | N | N | N |
HiRDB_PDTMID#9 | O#3, #4 | N | N | N |
HiRDB_PDXAMODE#9 | O#5 | N | N | N |
PDHOST | N | M#1, #6 | M#1, #6 | O#1, #6, #7 |
PDNAMEPORT | N | M#2, #6 | M#2, #6 | O#2, #6, #7 |
PDTMID#9 | N | O#3, #4, #6 | O#3, #4, #6 | O#3, #4, #6, #7 |
PDXAMODE#9, #10 | N | O#5, #6 | O#5, #6 | O#5, #6, #7 |
PDTXACANUM#9 | N | O | O | O |
PDCLTPATH | N | O | O | O |
PDUSER | N | N | M | M |
PDCWAITTIME | N | O | O | O |
PDSWAITTIME | N | M | M | M |
PDSQLTRACE | N | O | O | O |
PDUAPERLOG | N | O | O | O |
PDCLTAPNAME | N | O | O#8 | O#8 |
PDSWATCHTIME | N | N | M | M |
PDTRCMODE | N | O | O | O |
PDUAPREPLVL | N | O | O | O |
PDREPPATH | N | O | O | O |
PDTRCPATH | N | O | O | O |
PDSQLTRCOPENMODE | N | O | O | O |
PDAUTOCONNECT | N | N | N | N |
PDXARCVWTIME#9 | N | O | N | N |
PDCWAITTIMEWRNPNT | N | O | O | O |
PDTCPCONOPT | N | O | O | O |
PDAUTORECONNECT | N | N | N | N |
PDRCCOUNT | N | N | N | N |
PDRCINTERVAL | N | N | N | N |
PDKALVL | N | N | N | N |
PDKATIME | N | N | N | N |
PDSQLTEXTSIZE | N | O | O | O |
PDSQLEXECTIME | N | O | O | O |
PDRCTRACE | N | N | N | N |
Other environment variable | N | N | O | O |
#1: When HiRDB_PDHOST is specified, it is not necessary to specify PDHOST because the value specified in HiRDB_PDHOST is assumed for PDHOST. However, if HiRDB_PDHOST is not specified, PDHOST must be specified. If PDHOST and HiRDB_PDHOST are both specified, HiRDB_PDHOST takes precedence.
When PDHOST is specified in an environment variable group, the PDHOST specification of the environment variable group becomes effective.
For guidelines on the value to be specified in PDHOST, see (7) Fixing the communication-target server by specifying the PDFESHOST name in PDHOST (limited to HiRDB/Parallel Server).
#2: When HiRDB_PDNAMEPORT is specified, it is not necessary to specify PDNAMEPORT because the value specified in HiRDB_PDNAMEPORT is assumed for PDNAMEPORT. However, if HiRDB_PDNAMEPORT is not specified, PDNAMEPORT must be specified. If PDNAMEPORT and HiRDB_PDNAMEPORT are both specified, HiRDB_PDNAMEPORT takes precedence.
When PDNAMEPORT is specified in an environment variable group, the PDNAMEPORT specification of the environment variable group becomes effective.
#3: This information must be specified for accessing one HiRDB server using an X/Open-compatible API from multiple OLTPs.
#4: When HiRDB_PDTMID is specified, it is not necessary to specify PDTMID because the value specified in HiRDB_PDTMID is assumed for PDTMID. However, if HiRDB_PDTMID is not specified, PDTMID must be specified. If PDTMID and HiRDB_PDTMID are both specified, HiRDB_PDTMID takes precedence.
#5: When HiRDB_PDXAMODE is specified, it is not necessary to specify PDXAMODE because the value specified in HiRDB_PDXAMODE is assumed for PDXAMODE. However, if HiRDB_PDXAMODE is not specified, PDXAMODE must be specified. If PDXAMODE and HiRDB_PDXAMODE are both specified, HiRDB_PDXAMODE takes precedence.
#6: The same information must be specified in the various definitions.
#7: The same specification must be made at the servers of all users who access HiRDB. For this reason, specify this information in the user service default definition, rather than in the separate user service definitions.
#8: So that the user servers can be distinguished, this information should be specified in the individual user service definitions, rather than in the separate user-service default definition.
#9: When the multi-connection facility is used, the environment variable specification variables become invalid, even if these environment variables are set to the environment variable group that was registered for each connection destination. Also, in the Windows environment, variables become invalid even though they are specified in the HiRDB.ini file. The information that was specified in the OpenTP1 system service definitions becomes valid for these environment variables.
#10: Note that if the trnstring option and the PDXAMODE setting do not match, the xa function results in a -6 error.
If a UAP under TP1/LiNK is used as the client, the client environment definitions must be specified in the TP1/LiNK definitions. The specification procedures are as follows.
The following table shows the TP1/LiNK definitions in which the environment variables are specified.
Table 6-22 TP1/LiNK definitions in which the environment variables are specified
Environment variable | Transaction Service Environment Variables field | User Server Environment Variables field | |
---|---|---|---|
Global field | Local field | ||
HiRDB_PDHOST | N | N | N |
HiRDB_PDNAMEPORT | N | N | N |
HiRDB_PDTMID | N | N | N |
HiRDB_PDXAMODE | N | N | N |
PDHOST | M#2 | M#2 | O#2, #3 |
PDNAMEPORT | M#2 | M#2 | O#2, #3 |
PDTMID#5 | O#1, #2 | O#1, #2 | O#1, #2, #3 |
PDXAMODE#5 | O#2 | O#2 | O#2, #3 |
PDTXACANUM#5 | O | O | O |
PDCLTPATH | O | O | O |
PDUSER | N | N | M |
PDCWAITTIME | O | O | O |
PDSWAITTIME | M | M | M |
PDSQLTRACE | O | O | O |
PDUAPERLOG | O | O | O |
PDCLTAPNAME | O | O#4 | O#4 |
PDSWATCHTIME | M | M | M |
PDTRCMODE | O | O | O |
PDUAPREPLVL | O | O | O |
PDREPPATH | O | O | O |
PDTRCPATH | O | O | O |
PDSQLTRCOPENMODE | O | O | O |
PDAUTOCONNECT | N | N | N |
PDXARCVWTIME | O | N | N |
PDCWAITTIMEWRNPNT | O | O | O |
PDTCPCONOPT | O | O | O |
Other environment variable | N | O | O |
#1: This information must be specified for accessing one HiRDB server using an X/Open-compatible API from multiple OLTPs.
#2: The same information must be specified in the various definitions.
#3: The same specification must be made at the servers of all users who access HiRDB. For this reason, specify this information in the Global field of the User Server Environment Variables field, rather than in the Local field.
#4: So that the user servers can be distinguished, this information should be specified in the Local field of the User Server Environment Variables field, rather than in the Global field.
#5: When the multi-connection facility is used, the environment variable specification variables become invalid, even if these environment variables are set to the environment variable group that was registered for each connection destination. Also, in the Windows environment, variables become invalid even though they are specified in the HiRDB.ini file. The information that was specified in the TP1/LiNK definitions becomes valid for these environment variables.
If a UAP under TPBroker for C++ is used as the client, the client environment definitions must be specified in the TPBroker for C++ system definitions. For details about the TPBroker for C++ system definitions, see the TPBroker User's Guide.
The client environment definitions are specified with the following format.
tsdefvalue /OTS completion_process_env -a 'environment-variable-name=specification-value', ['environment-variable-name=specification-value', ...]
tsdefvalue /OTS recovery_process_env -a 'environment-variable-name=specification-value', ['environment-variable-name=specification-value', ...]
The following table shows the TPBroker for C++ definitions in which the environment variables are specified.
Table 6-23 TPBroker for C++ definitions in which the environment variables are specified
Environment variable | Transaction completion process | Transaction recovery process | Each UAP |
---|---|---|---|
HiRDB_PDHOST#8 | O#1, #4 | O#1, #4 | O#1, #4 |
HiRDB_PDNAMEPORT#8 | O#1, #5 | O#1, #5 | O#1, #5 |
HiRDB_PDTMID#8 | O#1, #3, #6 | O#1, #3, #6 | O#1, #3, #6 |
HiRDB_PDXAMODE#8 | O#1, #7 | O#1, #7 | O#1, #7 |
PDHOST | O#1, #4 | O#1, #4 | O#1, #4 |
PDNAMEPORT | O#1, #5 | O#1, #5 | O#1, #5 |
PDTMID#8 | O#1, #3, #6 | O#1, #3, #6 | O#1, #3, #6 |
PDXAMODE#8 | O#1, #7 | O#1, #7 | O#1, #7 |
PDTXACANUM#8 | O | O | O |
PDCLTPATH | O | O | O |
PDUSER | M | N | M |
PDCWAITTIME | O | O | O |
PDSWAITTIME | M | M | M |
PDSQLTRACE | O | O | O |
PDUAPERLOG | O | O | O |
PDCLTAPNAME | O | O | O#2 |
PDSWATCHTIME | N | N | N |
PDTRCMODE | O | O | O |
PDUAPREPLVL | O | O | O |
PDREPPATH | O | O | O |
PDTRCPATH | O | O | O |
PDSQLTRCOPENMODE | O | O | O |
PDAUTOCONNECT | N | N | N |
PDCWAITTIMEWRNPNT | O | O | O |
PDTCPCONOPT | O | O | O |
PDAUTORECONNECT | N | N | N |
PDRCCOUNT | N | N | N |
PDRCINTERVAL | N | N | N |
PDKALVL | N | N | N |
PDKATIME | N | N | N |
PDSQLTEXTSIZE | O | O | O |
PDSQLEXECTIME | O | O | O |
PDRCTRACE | N | N | N |
Other environment variable | O | N | O |
#1: The same information must be specified in the client environment definitions for the transaction completion process, transaction recovery process, and each UAP.
#2: So that the processes can be distinguished, this information should be specified in the individual processes.
#3: This information must be specified for accessing one HiRDB server using an X/Open-compatible API from multiple OLTPs.
#4: When HiRDB_PDHOST is specified, it is not necessary to specify PDHOST because the value specified in HiRDB_PDHOST is assumed for PDHOST. However, if HiRDB_PDHOST is not specified, PDHOST must be specified. If PDHOST and HiRDB_PDHOST are both specified, HiRDB_PDHOST takes precedence.
When PDHOST is specified in an environment variable group, the PDHOST specification of the environment variable group becomes effective.
For guidelines on the value to be specified in PDHOST, see (7) Fixing the communication-target server by specifying the PDFESHOST name in PDHOST (limited to HiRDB/Parallel Server).
#5: When HiRDB_PDNAMEPORT is specified, it is not necessary to specify PDNAMEPORT because the value specified in HiRDB_PDNAMEPORT is assumed for PDNAMEPORT. However, if HiRDB_PDNAMEPORT is not specified, PDNAMEPORT must be specified. If PDNAMEPORT and HiRDB_PDNAMEPORT are both specified, HiRDB_PDNAMEPORT takes precedence.
When PDNAMEPORT is specified in an environment variable group, the PDNAMEPORT specification of the environment variable group becomes effective.
#6: When HiRDB_PDTMID is specified, it is not necessary to specify PDTMID because the value specified in HiRDB_PDTMID is assumed for PDTMID. However, if HiRDB_PDTMID is not specified, PDTMID must be specified. If PDTMID and HiRDB_PDTMID are both specified, HiRDB_PDTMID takes precedence.
#7: When HiRDB_PDXAMODE is specified, it is not necessary to specify PDXAMODE because the value specified in HiRDB_PDXAMODE is assumed for PDXAMODE. However, if HiRDB_PDXAMODE is not specified, PDXAMODE must be specified. If PDXAMODE and HiRDB_PDXAMODE are both specified, HiRDB_PDXAMODE takes precedence.
#8: When the multi-connection facility is used, the environment variable specification variables become invalid, even if these environment variables are set in the environment variable group that was registered to each connection destination. Also, in the Windows environment, variables become invalid even though they are specified in the HiRDB.ini file. The information that was specified in the TPBroker for C++ system definitions becomes valid for these environment variables.
For the operation mode in which a UAP under TUXEDO is used as the client, specify the client environment definitions in the file specified by the ENVFILE parameter in the TUXEDO configuration file (UBBCONFIG file).
The following table shows the environment variables that can be specified.
Table 6-24 Environment variable specification status (for a UAP under TUXEDO)
Environment variable | Specification status |
---|---|
HiRDB_PDHOST | N |
HiRDB_PDNAMEPORT | N |
HiRDB_PDTMID | N |
HiRDB_PDXAMODE | N |
PDHOST | M#1 |
PDNAMEPORT | M#1 |
PDTMID#4 | O#1, #3 |
PDXAMODE#4 | M#1 |
PDTXACANUM | N |
PDUSER | M |
PDSWAITTIME | M |
PDCLTAPNAME | O#2 |
PDSWATCHTIME | N |
PDAUTORECONNECT | N |
PDRCCOUNT | N |
PDRCINTERVAL | N |
PDKALVL | N |
PDKATIME | N |
PDRCTRACE | N |
Other environment variable | O |
#1: The same information must be specified in the environment variables for the transaction manager server, TUXEDO system server, and each UAP.
For guidelines on the value to be specified in PDHOST, see (7) Fixing the communication-target server by specifying the PDFESHOST name in PDHOST (limited to HiRDB/Parallel Server).
#2: So that the processes can be distinguished, this information should be specified in the individual processes.
#3: This information must be specified for accessing one HiRDB server using an X/Open-compatible API from multiple OLTPs.
For the operation mode in which a UAP under WebLogic Server is used as a client, specify the client environment definitions in the environment variables of the WebLogic Server process.
The following table shows the environment variables that can be specified.
Table 6-25 Environment variable specification status (for a UAP under WebLogic Server)
Environment variable | Specification status |
---|---|
HiRDB_PDHOST | N |
HiRDB_PDNAMEPORT | N |
HiRDB_PDTMID | N |
HiRDB_PDXAMODE | N |
PDHOST | M#3 |
PDNAMEPORT | M |
PDTMID#4 | O#1 |
PDXAMODE#4 | M |
PDUSER | M |
PDSWAITTIME | M |
PDCLTAPNAME | O#2 |
PDSWATCHTIME | N |
PDAUTORECONNECT | N |
PDRCCOUNT | N |
PDRCINTERVAL | N |
PDKALVL | N |
PDKATIME | N |
PDRCTRACE | N |
Other environment variable | O |
#3: For guidelines on the value to be specified in PDHOST, see (7) Fixing the communication-target server by specifying the PDFESHOST name in PDHOST (limited to HiRDB/Parallel Server).
For the operation mode in which a UAP under TP1/EE is used as a client, specify the client environment definitions in the OpenTP1 system service definitions of the TP1/EE execution environment. For details, see (1) Using a UAP under OpenTP1 as the client.
Be sure to specify PDXAMODE. If the value specified for the OpenTP1 system in which TP1/EE is executed and the value specified for PDXAMODE are different, specify PDXAMODE in the user service definitions of the OpenTP1 system.
When the PDFESHOST host name is specified in PDHOST, the HiRDB client can be connected to the HiRDB server if a failure occurs in the system manager unit. In addition, the SQL execution destination, the PC cancel destination, and the XA recovery request destination can be fixed to a single communication-target server. PC cancel refers to the server completion instruction when the PDCWAITTIME duration is exceeded. XA recovery refers to the transaction completion instruction when a UAP under OLTP is used. For certain combinations of the client and server versions, the host name that can be specified in PDHOST is limited to the host name of the system manager.
The following figure shows the differences between fixing and not fixing the communication-target server.
Figure 6-1 Differences between fixing and not fixing the communication-target server
UAP execution environment | Specification recommended | ||||
---|---|---|---|---|---|
Non-OLTP system | A UAP has one connection, or the same PDFESHOST is specified for each connection when a UAP has multiple connections. | Y | |||
A different PDFESHOST is specified for each connection when a UAP has multiple connections. | N | ||||
OLTP system | OLTP system (WebLogic Server) operating with a single process (multi-thread) | The same PDFESHOST is specified for all connection destinations in the OLTP system (the connection destinations are the same).#1 | Y | ||
Each thread operating in the OLTP system specifies a different PDFESHOST.#1 | N | ||||
OLTP system (OpenTP1, TUXEDO, TPBroker for C++, or TP1/LiNK) operating with multiple processes | All UAPs specify the same PDFESHOST#1 | Y | |||
Each UAP specifies a separate PDFESHOST#1 | Client environment definition of a UAP for which PDFESHOST is specified#2 | The same PDFESHOST is specified for all connection destinations of a UAP for which PDFESHOST is specified | Y | ||
A different PDFESHOST is specified for each connection destination of a UAP for which PDFESHOST is specified. | N | ||||
Client environment definition for the transaction manager#3 | N |
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.