Previous Topic

Next Topic

Book Contents

Book Index

Startup script

You can use the scripting capabilities of AQT to specify some processing that AQT will do when it starts. You would typically use this to connect to the databases you commonly deal with, and set some session parameters (for those databases that have this concept).

This method is useful for automatically running standard queries for non-confident users.

To do this set up an AQT script file (an example startup.sql is provided with AQT) containing the statements you want to run when AQT starts. The script must contain the statement:

--aqt startup,mode=online

This tells AQT that you are starting AQT in online mode, rather than running a batch script.

The start-up script can contain SQL statements, including queries. A Run SQL window will be automatically opened and these queries will be run; the results will be shown in data display windows.

Setting up the startup script

You activate the startup script by passing the script-name to AQT when it starts. The best way of doing this is to set up a batch file which does this (an example startup.bat is provided with AQT). Once you have set this up, we suggest you also:

You can use this method to have different AQT Desktop icons (or startup scripts), each of which starts AQT with different database connections.

Any errors encountered during the startup-script will be written to file aqt_output.log.

Opening AQT with a Session

Much of the functionality of the Startup Script can also be done by starting AQT with a particular Session.

Advanced Query Tool
https://www.querytool.com
© 2023 Cardett Associates Ltd. All rights reserved.