If you are using Microsoft SQL Server JDBC Driver,Secure Sockets Layer (SSL) encryption is used to keep data security.
Secure Sockets Layer (SSL) encryption is a new feature of the Microsoft SQL Server 2005 JDBC Driver version 1.2, and enables transmitting encrypted data across the network between an instance of SQL Server and a client application.Secure Sockets Layer (SSL)
is a protocol for establishing a secure communication channel to prevent the interception of critical or sensitive information across the network and other Internet communications. SSL allows the client and the server to authenticate the identity of each other.
After the participants are authenticated, SSL provides encrypted connections between them for secure message transmission.
The Microsoft SQL Server 2005 JDBC Driver provides an infrastructure to enable and disable the encryption on a particular connection based on the user specified connection properties and the server and client settings. The user can specify the certificate
store location and password, a host name to be used to validate the certificate, and when to encrypt the communication channel.
The following code example demonstrates how to set the trustServerCertificate property in a connection string:
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.