Stop a dbutility Process Via dbauditwait

Use this procedure to temporarily stop updates to perform end-of-day reports when you use the command line client.

Note: If you use the service to initiate client runs, see the DATABridge Client Console Help for instructions on how to stop processing.

To stop processing using dbauditwait

The dbauditwait program runs continuously, waiting for a connection from the Notify program.

After the Notify program establishes a connection, it sends dbauditwait the current audit file number (AFN) and the data source name. The dbauditwait starts dbutility via a command file, batch file, or UNIX shell script. This script includes parameters which hold the data source name and the AFN number, respectively.

To make the DATABridge Client stop processing updates after the specified audit file is processed, you can use the AFN to the command files (or shell scripts) with the database command-line SQL execution utility (isql in the case of Microsoft SQL Server). You must execute a dbutility switchaudit command to ensure that no new updates are included in this audit file. To make COPYAUDIT initiate a dbutility process command every time an audit file becomes available, include the Notify program in the DATABridge COPYAUDIT WFL.

If the previously launched command file has not yet finished processing updates, dbauditwait does not respond to the connection request, and the Notify program times out. Because the DATABridge Client is already running, it processes the audit file that just became available. This method of operation minimizes the amount of delay between the time an audit file is closed and the time the DATABridge Client is started.

To use dbauditwait to process audit files, complete the following steps:

  1. Write a command file (shell script in the case of UNIX) that contains a dbutility process command.
  2. Change to the working directory for the data source in question.
  3. If you have not done so already, add the DATABridge program directory to the system path.
  4. Enter the following command from a Command Prompt session:

    dbauditwait port

where port is the port number that the Notify program uses on the host.

In order to run the DATABridge Client using dbauditwait, you must make sure that both dbauditwait and the Notify program use the same port number.

After the command file is launched, the DATABridge Client processes files until no more audit files are available. Then, the DATABridge Client terminates.

Note: If you specified additional procedures in the command file, then the DATABridge Client may stop processing or terminate under different conditions.