Database Connections & Setups
Connecting to Another Database
You may wish to connect to a database without defining it as a Datasource. To do this, click on Connect to another Database.

This will show you the following window:

Connecting to DB2
Follow this procedure for connecting to a DB2 database when you do not have an ODBC Datasource defined for it.
To connect to a DB2 database you need to specify:
the machine where the DB2 server resides
the TCP/IP Port the DB2 server is listening on. DB2 for LUW uses a default of 50000 but your server may be configured to use a different port. If in doubt, contact your DB2 specialist for this.
a DB2 server can host a number of databases. Specify the name of database you wish to connect to.
The connection to the database may be defined to your DB2 Client as an Alias. If so, you can just specify the alias name. AQT cannot give you a dropdown list of these.
There info on how to define an Alias to your DB2 Client at Configuring the DB2 Client.

Connecting to Oracle
Follow this procedure for connecting to a Oracle database when you do not have an ODBC Datasource defined for it.
To connect to an Oracle database you need to specify:
the machine where the Oracle server resides
the TCP/IP Port the Oracle server is listening on. By default this is 1521 but your server may be configured to use a different port. If in doubt, contact your Oracle specialist for this.
an Oracle server can host a number of databases. Each will be identified by a Service Name. Specify the Service Name of database you wish to connect to.
The connection to your database may be defined in your tnsnames.ora file. If so, you can just TNS Service name of the entry in the tnsnames.ora file. AQT cannot give you a dropdown list of these.
There more info on the tnsnames.ora file at Set up the tnsnames.ora file.

Connecting to MS SQL Server
Follow this procedure for connecting to a SQL Server database when you do not have an ODBC Datasource defined for it.
To connect to a SQL Server database you need to specify:
the machine where the SQL Server instance resides
If the server is your current machine, specify .\service-name. Example .\SqlExpress.
the name of the database. AQT cannot give you a dropdown list of these.

Connecting to MySQL
Follow this procedure for connecting to a MySQL database when you do not have an ODBC Datasource defined for it.
To connect to a MySQL database you need to specify:
the machine where the MySQL server resides.
If the server is your current machine, specify localhost
the TCP/IP Port the MySQL server is listening on. By default this is 3306 but your server may be configured to use a different port. If in doubt, contact your MySQL specialist for this.
the name of the database. AQT cannot give you a dropdown list of these.

Connecting to a File DSN
File DSNs are an alternative to using ODBC Datasources. With these, the definition of the connection is contained in a file. This file can then be shared or copied between users.

Creating a File DSN
To create a File DSN:
click on ODBC Manager
select the File DSN tab
click on Add
follow the dialog
You can also create a file DSN using a text editor. Information on how to do this can be found on various sources on the web.
We recommend taking an existing *.dsn file as a base then amending it and saving it with a new name.
Passwords
File DSNs provide no mechanism for holding passwords in a secure (eg. encrypted) way. For this reason we strongly recommend that passwords are not held as part of a File DSN.
By contrast, Datasource definitions do encrypt passwords. This is one advantage of Datasource definitions over File DSNs.
If the DSN file does not contain the userid/password, this can be entered on the Signon window as per normal.
Connecting to an MS Access or Excel file
Follow this procedure for connecting to an MS Access database or Exel file when you do not have an ODBC Datasource defined for it.
This is useful for signing onto ad-hoc databases / Excel files you need access to.

ODBC Drivers
This feature makes use of the MS Access and Excel ODBC Drivers, which are installed on most machines by default. You do not need to have MS Access or Excel installed on your PC to connect to these files with AQT.
The standard ODBC Drivers that come with Windows will only be able to connect to:
(for Access) an *.mdb file
(for Excel) an *.xls file
To connect to more recent file format, such as an *.accdb file and *.xlsx files, you will need to install the latest Microsoft Access Database Engine Redistributable. This can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=54920
Doing a Direct Connect
This section is for advanced users only.
AQT allows you to connect to a database without first having to define an ODBC Datasource. You would typically use this for a one-off database connection or when you need to specify some particular parameters on the connection.
If you are connecting to a file (such as an MS Access database, DBase file, SQLite database, Excel file or text files) the File Name box and selector will be enabled. You can specify the name of the file you are wishing to connect to. If you leave this blank, the ODBC Driver will prompt you for this.

Connection Strings
There is some information on the internet about the format of Connection Strings. One useful reference is at https://www.connectionstrings.com/
Alternatively, once you have signed onto a database, go Help > Database Details. At the bottom of this window there is a panel Connection Info. This shows you the connection parameters that the ODBC Driver has used to connect to the database (excluding the Driver name clause). For instance, if this is:
Then a connection string that would connect like this would be:
Driver={IBM DB2 ODBC DRIVER};DSN=SAMPLE;UID=db2admin;PWD=******;DBALIAS=SAMPLE;ASYNCENABLE=1;
(replace ***** with your password).
Encrypted Passwords
To avoid specifying passwords in clear text, AQT allows you to use encrypted passwords. You would do this by replacing pwd or password in the connection string with epwd or epassword respectively.
Encrypted passwords are a feature of AQT only. Connection strings containing these cannot be used in any other product.
Example:
Driver={IBM DB2 ODBC DRIVER};DSN=SAMPLE;UID=db2admin;EPWD=&cBmgS6xDpeg4yGBvYog=tV;DBALIAS=SAMPLE;ASYNCENABLE=1;