Reference Manual
CHAPTER 4. Database Administration Utilities
dbping [ switches ]
dbpingw [ switches ]
Switch |
Description |
---|---|
-c "keyword=value; ..." |
Database connection parameters |
-o |
Output log messages to a file |
-q |
Operate quietly—do not print messages |
-d |
Make a database connection if the server is found |
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.
-o Log output messages to a file.
-q Operate in quiet mode. If dbping fails, a message is always displayed. If dbping succeeds, no message is displayed if -q is specified.
The -d switch is used for specifying that you want to ping the database, not just the server. If the -d switch is not supplied, then dbping is successful if it finds the server specified by the -c switch. If the -d switch is supplied, then dbping is successful only if it can connect to the server and also connect to a database.
For example, if I have an engine named "verna" running on the database "sample" the following will succeed:
dbping -c "eng=verna;dbn=somedb"
If I had included the -d switch, however, it would have failed with the message "Ping database failed -- specified database not found":
Essentially what we do to find the engine is exactly what we do in a string connect. (So, for example, the dbcli6 Connection Parameters are considered in the same way.) If the -d switch is not specified, then we stop as soon as we find the server, and return success to the user. If the -d switch is specified, then we do the same thing as db_string_connect. In this case, we return success to the user if we did not get an error connecting (warnings are tolerated).