BCNOTIFY Initiated Scripts

This second category of automation scripts are initiated by BCNOTIFY, a utility included with DATABridge Host software.

BCNOTIFY is a host-based utility you can use to issue remote procedure calls (RPC) to the service and tell it to launch scripts. BCNOTIFY passes the script name and parameters in the RPC. BCNOTIFY can optionally pass a data source name as an additional parameter. If you do not supply a data source name in the RPC, the data source name must be provided within the script that the service launches. The advantage of including the data source name in the RPC is that the service will only launch the script if the data source is idle (versus always launching it).

Scripts initiated by BCNOTIFY are named as follows:

start_name.ext

where name is an arbitrary name, and ext is .cmd on Windows and .sh on UNIX.

When BCNOTIFY launches a script that initiates a process command, the service behaves differently when looking for an end-of-run script to execute. It first looks for a script named end_name.ext in the scripts subdirectory (where name is the name used in the original script and ext is the OS dependent file extension). If the service finds this script, it uses the script in place of the standard end-of-run script described earlier. Otherwise, the standard end-of-run script is used if it exists. This allows one to associate multiple end-of-run scripts with a data source, depending on which script started the process command.

These script files are passed the following set of parameters. The parameters for these scripts can change, depending on whether the data source is an empty string. For example, if no data source name is provided, parameter one is the AFN and parameter 2 is the token.

Parameters

  • Data source name (optional)
  • Parameters supplied by BCNOTIFY. For example, the current database audit file number (AFN)
  • A token used as the password when connecting back to the service via the Batch Console