PROTOCOL_CAPTURE connection property

Use the PROTOCOL_CAPTURE connection property to specify a file for receiving the TDS packets exchanged between an application and an Adaptive Server. PROTOCOL_CAPTURE takes effect immediately so that TDS packets exchanged during connection establishment are written to the specified file. All packets continue to be written to the file until Capture.pause is executed or the session is closed.

The following example shows the use of PROTOCOL_CAPTURE to send TDS data to the file tds_data:

...
props.put("PROTOCOL_CAPTURE", "tds_data")
Connection conn = DriverManager.getConnection(url, props);

where url is the connection URL, and props is a Properties object for specifying connection properties.