Nonstop Database, HiRDB Version 9 System Operation Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
8.9.2 Using the SQL runtime warning output facility
(1) Specifying PDCWAITTIME
Specify the client maximum wait time in PDCWAITTIME in each client environment definition. If you specify 0 (or nothing) in PDCWAITTIME, the SQL runtime warning output facility will not be applied to SQL statements executed from that HiRDB client.
If you specify number-of-secondssec or auto in the PDCWAITTIMEWRNPNT or pd_cwaittime_wrn_pnt operand, the SQL runtime warning output facility will be applied even when the PDCWAITTIME operand is omitted.
For details about PDCWAITTIME, see the HiRDB Version 9 UAP Development Guide.
(2) Specifying a percentage of the value specified in the PDCWAITTIME operand or an amount of elapsed time that is to constitute a trigger for output of a warning to a file
Use the following operands to specify the conditions under which warning information is to be output:
- PDCWAITTIMEWRNPNT (client environment definition)
- pd_cwaittime_wrn_pnt operand (HiRDB system definition)
(a) Specifying a percentage of the value specified in the PDCWAITTIME operand
Specify in the PDCWAITTIMEWRNPNT and pd_cwaittime_wrn_pnt operands a percentage (between 0 and less than 100) of the value specified in the PDCWAITTIME operand. For example, if you specify 90 (%) in the PDCWAITTIMEWRNPNT or pd_cwaittime_wrn_pnt operand and 100 (seconds) in PDCWAITTIME, HiRDB will monitor SQL execution time as soon as an SQL begins executing. If the SQL execution time is determined to be 90 or more seconds, warning information is output.
You can specify an unsigned integer or an unsigned decimal number (a number that includes a decimal point and up to six decimal places).
(b) Specifying an amount of elapsed time that is to constitute a trigger for output of warning information to a file
Specify in the above operands a value between 0 and less than the value specified in the PDCWAITTIME operand as the amount of elapsed time that is to constitute the trigger for output of SQL runtime warning information.
If the value specified in the PDCWAITTIMEWRNPNT operand is greater than the value specified in the PDCWAITTIME operand, an error occurs during a connection request.
- Note
-
- The PDCWAITTIMEWRNPNT specification takes precedence over the specification of the pd_cwaittime_wrn_pnt operand.
- If 0 (%) is specified in PDCWAITTIMEWRNPNT, the SQL runtime warning output facility does not monitor SQL statements executed from that HiRDB client.
- Reference note
-
- HiRDB determines the amount of elapsed time for output of warning information from the following formulas based on the values in the above operands:
- When an unsigned integer is used to specify a percentage of the PDCWAITTIME operand:
elapsed-time-basis-for-output-of-warning-information = MAX(
(a
b)
100
, 1)
a: Value of PDCWAITTIME
b: Value of the PDCWAITTIMEWRNPNT or pd_cwaittime_wrn_pnt operand (whichever was applied, in accordance with the precedence level of these operands)
- When an unsigned decimal number is used to specify a percentage of the PDCWAITTIME operand:
elapsed time basis for output of warning information = (a
b)
100
a: Value of PDCWAITTIME
b: Value of the PDCWAITTIMEWRNPNT or pd_cwaittime_wrn_pnt operand (whichever was applied, in accordance with the precedence level of these operands)
Note that up to six decimal places are valid for the elapsed time basis for output of warning information. The seventh and subsequent decimal places are truncated.
- When an amount of elapsed time that is to constitute a trigger for output of warning information to a file is specified:
elapsed time basis for output of warning information = absolute value of time that constitutes trigger for output of warning information to file
The accuracy of the timer used by HiRDB in a server depends on the platform. Therefore, if the timer's accuracy is low, warning information might not be output in some cases, even though the actual SQL execution time exceeded the elapsed time basis for output of warning information.
(3) Specifying the output directory for the SQL runtime warning information files
Specify the output directory for the SQL runtime warning information files in the pd_cwaittime_report_dir operand. Two files are created in this directory, pdcwwrn1 and pdcwwrn2.
Note that if the OS detects an error, such as a file system error or that the user does not have write privileges for the directory or file, no warning will be output to the SQL runtime warning information file. In such a case, execution processing of the SQL code will continue.
(4) Specifying the maximum size of an SQL runtime warning information file
Specify the pd_cwaittime_report_size operand to change the maximum size for SQL runtime warning information files. The value specified in this operand is the size of one SQL runtime warning information file. When you specify this value, take into account that two SQL runtime warning information files are created. For example, if you specify 10,000, then two files, each with a maximum size of 10,000 bytes, will be created in the directory.
- Remarks
- When the amount of data output to the first file exceeds the value set in this operand, output will switch to the other file. If the amount of data output to the second file exceeds this value, output will switch back to the first file. Output will continue to switch between the two files in this manner. Each time output is switched to a file that has already been used, the existing information in it is overwritten.
- If the amount of SQL runtime warning information that is output in a single output session exceeds the maximum file size, some of the information will be lost. Such SQL runtime warning information is output only to the point at which the file becomes full. When this happens, a hash mark (#) is output at the end of the SQL runtime warning information.
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.