The Ping utility
122
The Ping utility
The Ping utility is provided to assist in diagnosing connection problems.
dbping [
switches
]
Switch Description
–c "keyword=value; ..." Database connection parameters
–d
Make a database connection if the server is found
-l library Use specified ODBC driver or driver manager
library.
-m
Use ODBC Driver Manager. Otherwise, connect
using embedded SQL.
–o filename Log output messages to a file
–q
Operate quietly—do not print messages
The
dbping
command-line utility is provided to help debug connection
problems. It takes a full or partial connection string and returns a message
indicating whether the attempt to locate a server or database, or to connect,
was successful.
On UNIX, a threaded version is also supplied, as the
dbping_r
executable.
Connection parameters (–c) For a description of the connection
parameters, see "Connection parameters" on page 64 of the book ASA User’s
Guide. If the connection parameters are not specified, connection parameters
from the SQLCONNECT environment variable are used, if set.
Make database connection (–d) Ping the database, not just the server.
If you do not supply the
-d switch, then
dbping
reports success if it finds the
server specified by the
-c switch. If you do supply the -d switch, then
dbping
reports success only if connects to the server and also connect to a
database.
For example, if you have a server named blair running the database
sample
,
the following succeeds:
dbping -c "eng=blair;dbn=sample"
The following command fails, with the message Ping database failed --
specified database not found
:
dbping -d -c "eng=blair;dbn=sample"
Syntax
Description
Switches