Previous Topic

Next Topic

Book Contents

Book Index

Running a DB2 Command

For DB2/UDB and DB2 z/OS you can also run utility control statements (such as Runstats, Load etc). These are not “normal” statements so cannot be run through a normal SQL interface; instead AQT will create an instance of the DB2 Command-Line Processor (CLP) and pass the utility control statements to it.

You can run statements in two ways:

Security Issues

In order to connect to a database through the DB2 CLP, AQT will need to specify the user-id and password in the connection script.

This is a minor security risk. Consequently you can not run a DB2 Command if you specify Options > User Rights > Disable Save Password. When this option is specified, AQT adopts a higher security model, which will not allow this risk.

If you try to do so you will get message For security reasons, this function can not be used. See Disable Save Password for more on this.

Running DB2 Commands in Batch

This can be done by prefixing the command with (db2), as discussed earlier.

DB2 z/OS Commands

DB2 for z/OS has a number of commands such as -DISPLAY DATABASE, BIND etc. These are a different category of commands which cannot be run through the DB2 CLP.

Instead, DB2 for z/OS provides a number of Stored Procedures for running these:

For further information on these commands, consult the DB2 z/OS documentation.

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