Previous Topic

Next Topic

Book Contents

Book Index

Unattended Batch Mode

This feature of AQT allows you to run a set of SQL statements (and other AQT functions) in unattended batch mode.

An AQT batch script consists of:

Samples

A number of example batch files are supplied with AQT. These will be in the AQT install directory, and have names starting with batch_. We recommend that you use these as models for building your own scripts.

Batch file

The batch file consists of the following statement

aqt infile logfile options

where

Running the script

You run the batch script by running the batch file. This can be done by double clicking the file in the Windows explorer.

Exit code

If AQT hits any errors while running your batch script, it will return attempt to set an exit code; however instead will crash. This is discussed in the section Crash in smartuishared when AQT is closing.

Scheduling AQT batch scripts

AQT does not supply a scheduler for running your batch scripts. This is because Windows has a scheduler which can be used for this purpose. The Window scheduler can be run with the AT command (from a command prompt). In Windows XP, there is a graphical interface into this - see Start > Programs > Accessories > System Tools > Scheduled Tasks.

Script file

The script file consists of a series of AQT scripting statements and SQL statements. batch_sample.sql is an example of this, and demonstrates many of the script statements.