Nonstop Database, HiRDB Version 9 System Operation Guide
When the facility for automatically loading audit trail table data is used, the audit trail table can be referenced based on a NOWAIT search even while the pdload command is loading data.# When you reference the audit trail table, specify WITHOUT LOCK NOWAIT for the SQL's lock option. If the audit trail table is referenced without the SQL lock option specified, an SQL that tries to access the audit trail table while the pdload command is executing might be placed on lock-release wait status, or the pdload command that is trying to load data to the audit trail table being searched by means of the SQL code might time out on lock-release wait. This results in abnormal termination of the pdload command.
When a retryable error occurs, such as a time-out on lock-release wait, the facility for automatically loading data reloads data, but stops if the error keeps occurring. In this case, the facility for automatically loading data must be manually restarted. For details about the actions to take according to the error contents, see Table 24-38 Description of errors that might occur during automatic data loading and the corrective actions to take.
Search method | When data is not being loaded | When data is being loaded | |||
---|---|---|---|---|---|
Buffer used by the pdload command | Index creation method used by the pdload command | ||||
Global | Local | Simultaneous | Batch | ||
NOWAIT search | Y | Y | N | Y | N |
Other searches | Y | N | N | N | N |
The facility for automatically loading audit trail table data starts and stops at the following times:
In the cases listed below, the facility for automatically loading data stops immediately. For audit trail files into which data was not loaded, data is loaded when the pdstart or pdaudatld command is executed the next time around.
The pdaudatld command controls restarting and stopping the facility for automatically loading audit trail table data. For details, see the manual HiRDB Version 9 Command Reference.
The auditor can use the pdaudatld command to temporarily stop the facility for automatically loading data at any point in time. This operation example explains the procedure for temporarily stopping the facility for automatically loading data, and then backing up the content of the audit trail table by saving it into an unload log file either when the facility is stopped or when the day's jobs are finished.
When the facility for automatically loading audit trail table data is used, the behavior of HiRDB during termination might change. The following table describes the behavior of HiRDB for each type of termination and the corrective action to take in each case.
Table 24-13 HiRDB behavior during termination when the facility for automatically loading audit trail table data is used
Type of termination | Automatic data loading execution status | HiRDB behavior | Corrective action | ||
---|---|---|---|---|---|
Termination processing | Operating status of the facility for automatically loading data#1 | ||||
Normal system termination (pdstop execution) or planned system termination (pdstop -P execution) |
Not executed | Same as when the facility for automatically loading data is not used | Keeps ENABLE. | -- | |
Executing |
|
|
|||
Forced system termination (pdstop -f execution) | Not executed | Same as when the facility for automatically loading data is not used. | Keeps ENABLE. | -- | |
Executing |
|
||||
Normal non-manager unit termination (pdstop -u or -x)#4 | Unit containing the audit trail table, or unit containing an audit trail file from which data is automatically being loaded | Not executed. | Same as when the facility for automatically loading data is not used. | Keeps ENABLE. | -- |
Executing | The unit does not terminate normally. The message KFPS05070-E or KFPS05234-E is displayed and the pdstop command terminates in error. | To stop the applicable unit normally, first use the pdaudatld -t command to stop the facility for automatically loading data, and then execute the pdstop -u/-x command. | |||
All other units | Not executed | Same as when the facility for automatically loading data is not used. | Keeps ENABLE. | -- | |
Executing | |||||
Forced non-manager unit termination (pdstop -z or -z -q) Abnormal termination#2, #4 |
Unit containing the audit trail table, or unit containing an audit trail file from which data is automatically being loaded | Not executed | Same as when the facility for automatically loading data is not used. | Keeps ENABLE. | -- |
Executing |
|
To restart the facility for automatically loading data, execute the pdaudatld -b command. | |||
All other units | Not executed | Same as when the facility for automatically loading data is not used. | Keeps ENABLE. | -- | |
Executing | |||||
Forced manager unit termination (pdstop -z or -z -q) Abnormal termination#2, #4 |
Not executed | Same as when the facility for automatically loading data is not used. | Keeps ENABLE even after the manager unit is restarted. | -- | |
Executing |
|
||||
Normal server termination (pdstop -s or -u -s)#4 | Server containing the audit trail table | Not executed | Same as when the facility for automatically loading data is not used. | Keeps ENABLE. | -- |
Executing | The server does not terminate normally. The message KFPS05071-E or KFPS05235-E is displayed and the pdstop command terminates in error. | To stop the applicable server normally, first use the pdaudatld -t command to stop the facility for automatically loading data, and then execute the pdstop -s/-u -s command. | |||
All other servers | Not executed | Same as when the facility for automatically loading data is not used. | Keeps ENABLE. | -- | |
Executing | |||||
Forced server termination (pdstop -s -f, -s -z or -u -s -z)#3, #4 | Server containing the audit trail table | Not executed | Same as when the facility for automatically loading data is not used. | Keeps ENABLE. | -- |
Executing |
|
To restart the facility for automatically loading data, execute the pdaudatld -b command. | |||
All other servers | Not executed | Same as when the facility for automatically loading data is not used. | Keeps ENABLE. | -- | |
Executing |
When the facility for automatically loading audit trail table data is used, it can be stopped using the pdaudatld -t command, but the timing for stopping it varies depending on the automatic data loading execution status. The following table describes the behavior of HiRDB when the facility for automatically loading data is stopped.
Table 24-14 HiRDB behavior when the facility for automatically loading data is stopped
Automatic data loading execution status | HiRDB behavior | |
---|---|---|
Behavior when the pdaudatld -t command is executed | Behavior of automatic data loading | |
Not executed |
|
-- |
Executing |
|
|
In cases (4) and (5) above, another command (pdstop or pdaudatld -t) might be waiting for data loading into the audit trail table to be completed. When data loading is completed, command execution resumes, but if data loading terminates in error, command execution resumes without waiting for data loading completion. The following table describes the behavior of HiRDB when data loading terminates in error.
Table 24-15 HiRDB behavior when data loading terminates while waiting for data loading to the audit trail table to be completed
Command waiting for data loading completion to the audit trail table | Data loading termination status | |
---|---|---|
Normal termination | Error termination | |
pdstop |
|
|
pdaudatld -t |
|
|
When the facility for automatically loading audit trail table data is used, there is no need to manage audit trail files (except when input/output errors occur). However, care must be taken to prevent a space shortage from occurring in the RDAREA storing the audit trail table.
As long as audit trails are being recorded in audit trail files, data loading automatically continues; therefore, if a space shortage occurs in the RDAREA storing the audit trail table, data can no longer be loaded and the facility for automatically loading data stops.
If the facility for automatically loading data stops, first delete unnecessary data or expand the RDAREA, and then restart the facility for automatically loading data. For details about the actions to take, see Table 24-38 Description of errors that might occur during automatic data loading and the corrective actions to take.
If the audit trail table is swapped while data is being loaded from an audit trail file, the swapped-in audit trail table is placed in lock-release wait status until processing of the earlier audit trail file is complete. During this time no data can be loaded.
If the lock-release wait status lasts a long time for a reason such as an error in the earlier data loading process, the number of audit trail files waiting for data loading might increase. If 0 is specified for the pd_lck_wait_timeout operand, audit trail files wait until the lock-release wait status is cleared. Therefore, use the pdaudatld command to monitor the status of audit trail files.
When HiRDB loads data from audit trail files, the pdload command does not check the privileges of the executing user, and therefore no audit record from a privilege check is output. Note that the length of the user identifier that is output in an audit record at even termination is 0 bytes.
All Rights Reserved. Copyright (C) 2011, 2015, Hitachi, Ltd.