DRDA Connectivity Test — Usage
drdatest INFORMIXSERVER
INFORMIXSERVER is the only argument — the name of an sqlhosts entry whose protocol is drsoctcp or drsocssl. There are no command-line options. Everything else is supplied through the environment, which keeps credentials out of argv and therefore out of ps output.
Environment
| Variable | Meaning |
|---|---|
| INFORMIXSQLHOSTS | Full path to the sqlhosts file. Overrides $INFORMIXDIR/etc/sqlhosts when set. |
| INFORMIXDIR | Required unless INFORMIXSQLHOSTS is set. Used only to find sqlhosts. |
| DRDATEST_USER | Username. Unset to be prompted. An empty value selects a trusted connection. |
| DRDATEST_PASSWORD | Password. Unset to be prompted. |
| DRDATEST_DATABASE | Database to connect to. Defaults to sysmaster. |
| DRDATEST_SSLCERT | Path to the SSL server certificate or keystore. Required for drsocssl servers, unused otherwise. |
| DRDATEST_TIMEOUT | Login timeout in seconds. Default 15. |
Credentials
When DRDATEST_USER and DRDATEST_PASSWORD are unset the tool prompts on the controlling terminal — username echoed, password with echo disabled through termios. The password is never printed and never appears in any diagnostic output.
Passing credentials by environment rather than by argument is deliberate. A password on the command line is visible in ps output to every user on the machine for the lifetime of the process, and lands in shell history; the environment carries neither exposure.
Trusted connections
An empty username requests a trusted connection: the password step is skipped and the connection string omits UID and PWD entirely. The keywords must be absent, not empty — sending UID=;PWD=; is rejected by the server with SQL30082N reason 17 (“UNSUPPORTED FUNCTION”).
Whether a trusted connection is accepted is a server-side matter. A listener configured to require authentication will refuse it, and that refusal is not a client fault. In practice an Informix DRDA listener negotiating only user-id-plus-password will reject every credential-less mechanism.
Examples
Interactive — prompts for username and password:
$ drdatest zeus_drda Username (blank for trusted connection): tester Password: OK: zeus_drda reachable over drsoctcp (192.0.2.10:1524); server time=2026-08-01 10:03:43.000000 $ echo $? 0
Non-interactive, against a named database:
$ DRDATEST_USER=tester DRDATEST_PASSWORD=secret \ DRDATEST_DATABASE=stores \ drdatest zeus_drda
Against an SSL listener, supplying trust material:
$ DRDATEST_SSLCERT=/opt/certs/informix.arm drdatest zeus_ssl
sqlhosts entries
Entries are parsed as whitespace-separated fields — dbservername nettype hostname servicename [options]. Blank lines and text from # to end of line are ignored.
zeus_drda drsoctcp dbhost.example.com 1524 zeus_ssl drsocssl dbhost.example.com 1525
A matched entry whose nettype is anything other than drsoctcp or drsocssl — onsoctcp, say, or a group entry — is rejected as an unsupported protocol. That is the correct outcome, not a defect: onsoctcp is the native SQLI protocol and cannot be tested by a DRDA client.