connect to sql server from java using windows authentication RRS feed

  • Question

  • Hi,

    I want to connect to ms sql server, which works with windows authentication only, from my java program. Note: My code runs on linux so I can't install any dlls

    Is there a way to do it?

    Sunday, March 1, 2009 2:49 PM


All replies

  • Hi Ori,

    To connect to SQL Server from Java, using the Microsoft SQL Server JDBC driver on Linux, you need to enable SQL Server and Windows Authentication on the target SQL Server instance.  The instructions for doing so are here:

    If a secure cross-platform single sign-on capability would be an important feature for you to have in the Microsoft driver, please let us know by adding your comments to our feature survey for the SQL Server 2008 driver.

    --David Olix [SQL Server]
    Monday, March 2, 2009 5:39 PM
  • I cannot change the db security policy, and I don't need single-sign-on. I have a trusted user with windows credentials
    Tuesday, March 3, 2009 6:30 AM
  • Has Microsoft made any progress on this issue?  The issue being (apparently) that you can't use the "Trusted Connection"/"Windows Authentication" (or more secure method of connecting to SQL Server) from the Linux JDBC Library.

    Tuesday, March 2, 2010 5:55 PM