Data Encryption
- Last Updated: April 16, 2026
- 1 minute read
- ADO.NET
- Documentation
The DB2 data provider supports database-specific encryption (DB2’s own encryption protocol) for:
- DB2 for Linux/UNIX/Windows
- DB2 for z/OS
The DB2 data provider supports SSL encryption for:
- DB2 V9.1 Fixpack 2 and higher for Linux/UNIX/Windows
- DB2 V9.1 for z/OS
- DB2 for i5/OS V5R3 or higher
See Data Encryption Across the Network for more information.
Configuring DB2-Specific Encryption
- Set the Authentication Method connection string option to ClearText, EncryptedPassword, EncryptedUIDPassword, or Client.
- Set the Encryption Method connection string option to DBEncryption.
Configuring SSL Encryption
Note: Connection hangs can occur when the data provider is configured for SSL and the database server does not support SSL. You may want to set a connection timeout using the Connection Timeout connection string option to avoid problems when connecting to a server that does not support SSL.
To configure SSL encryption:
- Set the Encryption Method connection string option to SSL.
- To validate certificates sent by the database server, set the Validate Server Certificate connection string option to True.
- Optionally, set the Host Name In Certificate connection string option to a host name to be used to validate the certificate. The Host Name In Certificate connection string option provides additional security against man-in-the-middle (MITM) attacks by ensuring that the server the data provider is connecting to is the server that was requested.