Previous Topic

Next Topic

Book Contents

Book Index

Startup Command Arguments

You can supply command arguments when you start AQT.

These can be provided by:

The various command arguments are given as follows:

Argument

Description

aqtv11.exe sqlfile logfile append

Old format for running a batch script

aqtv11.exe sqlfile=file1.sql,logfile=file1.log

New format for running a batch script

aqtv11.exe sqlfile=custreport.sql,custcode=MS01,rptyear=2021

Run batch script custreport.sql.

Parameters custcode and rptyear can be specified on the command.

aqtv11.exe aqtdemo.mdb

Open an MS Access database with AQT.

Can also be used to open files of type: xls, xlsx, dbf, csv, accdb

aqtv11.exe create_tables.ddl

Start AQT and run the statements in the DDL file

aqvt11.exe chart.xcf

Start AQT and display the chart file

aqtv11.exe -e demo.sql

Start AQT and edit the file in the SQL window. The SQL is not run.

aqtv11.exe -activate,username=KTrout

Activate your AQT license

aqtv11.exe conn=connection string,dbs=dbname

Start AQT and connect to a database.

dbs gives the name of the database within AQT.

aqtv11.exe options=optionname=optionvalue

Start AQT specifying an option.

Connecting to a database when AQT starts

The command to do this is:

aqtv11.exe conn=connection-string,dbs=dbname

Examples of connection strings:

conn=dsn=AQTDemo

Connect to datasource AQTDemo

conn="dsn=DB2SAMP;uid=test;pwd=testpwd;"

Connect to datasource DB2SAMP specifying the userid and password.

conn="dsn=DB2SAMP;uid=test;epwd=^PM3xj3+LTxu9MVIkYzVOx66qjgGczP2+DagpjY/BY=kg;"

Connect to datasource DB2SAMP specifying the userid and an encrypted password.

It is recommended that encrypted passwords are used if the command is coded in a bat file

conn="driver=oracle;ServerName=oraserv01:1521/XE;UID=system;PWD=******""

Connect to Oracle where no datasource has been defined

The third example shows how you can connect to a database when you haven't created a datasource. This form of the connection string requires you to specify the Driver. There are two formats:

In the first of these, you need to specify the driver name exactly. If it is different by as much as a single byte, the connection will fail.

The second example is an AQT-developed variation of the Driver clause. AQT will scan all drivers defined to your Windows system looking for one containing "Oracle". It will then use this driver in your connection string. The "MS ODBC for Oracle" driver will be ignored.

Starting AQT specifying options

You can specify options when you start AQT.

Examples:

aqtv11.exe options=readonlymode=yes

 

aqtv11.exe options=sessions=n,options=maxrows=100

Example of specifying more than one option

aqtv11.exe options=cfgdir="Q:\AQT Files\aqt_cfg"

Enclose values in double-quotes if they contain spaces

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