Windows 2003 Standard SP2 using a JDBC connection to server running SQL 2005 on a Windows 2003 SP2 64bit


  • My JDBC application connection to my SQL 2005 database is working successfully from my 2003 application server.

    Now I have applied a certificate from my Windows 2008 Enterprise CA to my SQL 2005 server and in SQL server manager forced encryption on the database.

    How do I turn on encryption in JDBC so it will talk encrypted to my SQL db?

    I am not very familiar with JDBC.

    After forcing encryption on my SQL DB, my services no longer start on my application server with the jdbc connection.

    Montag, 5. März 2012 22:56


  • Hi,

    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:

     String connectionUrl =
        "jdbc:sqlserver://localhost:1433;" +
         "databaseName=AdventureWorks;integratedSecurity=true;" +

    Please refer to this online article for more detials.

    Best Regards,

    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.

    • Als Antwort vorgeschlagen Marcelo Farinelli Dienstag, 6. März 2012 14:01
    • Als Antwort markiert Peja Tao Montag, 12. März 2012 02:29
    Dienstag, 6. März 2012 06:39