Test TCP connectivity to a SQL Server instance.
Opens a raw TCP socket to the specified host and port. If the connection
is established within the timeout, returns { Reachable: true }. Otherwise
returns a structured error with a human-readable message tailored to common
failure modes (ECONNREFUSED, ENOTFOUND, ETIMEDOUT, ECONNRESET).
SQL Server hostname or IP address.
SQL Server TCP port (typically 1433).
Maximum time to wait for the connection, in milliseconds (default: 5000).
Connectivity result with reachability status, optional error, and latency.
Lightweight adapter for testing SQL Server connectivity via raw TCP sockets.
Does not perform SQL authentication or execute queries — only verifies that the host:port is accepting TCP connections. This is sufficient for preflight checks and post-provisioning validation.
Example