Tests the network response time of the underlying connectivity between a client and a database server where DB2 Connect is used to establish the connection.
Authorization
None
Required Connection
Database
Command Syntax
.-time-. .-1--+------+---------------------. >>-PING---db_alias----+-+-----------------------------+-+------>< '-number_of_times--+-------+--' +-times-+ '-time--'
Command Parameters
Examples
To test the network response time for the connection to the host database server hostdb once:
db2 ping hostdb 1 or: db2 ping hostdb
The command will display output that looks like this:
Elapsed time: 7221 microseconds
To test the network response time for the connection to the host database server hostdb 5 times:
db2 ping hostdb 5 or: db2 ping hostdb 5 times
The command will display output that looks like this:
Elapsed time: 8412 microseconds Elapsed time: 11876 microseconds Elapsed time: 7789 microseconds Elapsed time: 10124 microseconds Elapsed time: 10988 microseconds
Usage Notes
A database connection must exist before invoking this command, otherwise an error will result.
The elapsed time returned is for the connection between the client and a DRDA server database via DB2 Connect.