Testing the Database Connection in a Windows Environment
Use the following procedure to test the database connection in a Windows environment.
To test the database connection on the Windows platform
To ensure that you can connect to the database alias that you have defined, you can use either the DB2 Configuration Assistant, or the DB2 Command Window or Command Line Processor.
To use the DB2 Configuration Assistant method, start the utility, highlight the database alias that you created, and right-click.
Select the Test Connection option.
Enter an authorized user ID and password, and select ODBC and CLI as the test parameters.
Click Test Connection.
The following message indicates a successful connection:
CLI connection tested successfully. ODBC connection tested successfully.
Alternatively, you can use the DB2 Command Window or the DB2 Command Line Processor to test the database connection by typing the following, then pressing Enter:
DB2 connect to database_alias user database_userID using database_password
where:
database_aliasis the database alias you created using DB2
database_userID and database_password are an authorized user ID and its associated password on the DB2 host.
If the connection is successful, database connection information appears.