TCP Keep Alive
- Last Updated: August 9, 2021
- 1 minute read
- DataDirect Connectors
- ODBC
- Microsoft SQL Server 8.0
- Documentation
Attribute
KeepAlive (KA)
Purpose
Specifies whether the driver enables TCPKeepAlive. TCPKeepAlive maintains idle TCP connections by periodically passing packets between the client and server. If either the client or server does not respond to a packet, the connection is considered inactive and is terminated. In addition, TCPKeepAlive prevents valid idle connections from being disconnected by firewalls and proxies by maintaining network activity.
Valid Values
0 | 1
Behavior
If set to 0 (Disabled), the driver does not enable TCPKeepAlive.
If set to 1 (Enabled), the driver enables TCPKeepAlive.
Default
0 (Disabled)
Notes
- This option differs from Keep Connection Active (KeepConnectionActive) in that it maintains only the TCP socket, while Keep Connections Active maintains the connection to the database or Azure SQL Gateway. If you have a database or gateway timeout, you will need to enable Keep Connection Active to prevent your connection from terminating during idle periods.