Using the db2test utility
The db2test utility allows you to test connections to a DB2® database and, once connected, to issue a variety of commands.
About this task
If your operating system does not provide the db2test utility, use the cxntest utility to test connections to the target database.
Procedure
- From a command prompt on the Unica Campaign server,
run the db2test utility.
The utility returns a list of databases (registered data sources) that you can connect to.
-
Enter the following information exactly at the prompts:
- The name of the database you want to connect to (taken from the list of Registered Data Sources)
- A database user ID
- The password associated with the database user ID
The utility does not prompt for confirmation of your selections.
-
When you have successfully connected to the database, the utility prints out messages like
the following and presents you with a command prompt:
Server ImpactDemo conforms to LEVEL 1. Server's cursor commit behavior: CLOSE Transactions supported: ALL Maximum number of concurrent statements: 0 For a list of tables, use PRINT.
- You can enter the following commands at the prompt:
describe pattern
Describes the table or tables specified by pattern. Returns the corresponding type, data type, storage length, precision, and scale.
exit
Terminates the database connection and exits.
help
Displays a list of supported commands.
print [pattern]
Returns a list of tables. Can optionally specify a search pattern.
quit
Terminates the database connection and exits.
SQL_command
Executes any valid SQL command or series of SQL commands.
typeinfo
Returns a list of supported data types for the database.