Previous Topic

Next Topic

Book Contents

Book Index

AQT scripting

In This Chapter

Unattended Batch Mode

Scripting functions

Startup script

The scripting component of AQT allows you to run a set of SQL statements (and other AQT functions) without any prompting by AQT. This feature is useful for automating a series of queries and other functions.

AQT scripting is available for many AQT functions: these are detailed in Scripting Functions.

Scripting control statements can be run from either:

Scripting syntax

The general syntax of an AQT scripting statement is:

--aqt function,parameter=value,parameter=value


--aqt export,file=output.txt,type=csv,filemode=replace,prompt=no

All AQT scripting statements start with -- (two minus signs), which is SQL syntax for a comment. This means that you can run your script using some other script processor (eg. SQLPlus, DB2 CLP etc) and the AQT script statements will be ignored.

If your parameter value contains a comma, blank, or some other special character, you should enclose the value in double-quotes. The double-quote is used by the AQT batch processor to delimit values. Example:

--aqt export,file="customer data.txt",type=csv,filemode=replace,prompt=no

Functions and parameters are NOT case-sensitive.