Skip to content Skip to sidebar Skip to footer

Java.sql.sqlexception: Single-sign-on Is Only Supported On Windows. Please Specify A User Name

I am using the jTDS driver in order to connect to an SQL Server database from my Android application, which uses the Windows Authentication. As advised in the FAQs, I read the READ

Solution 1:

Since you are connecting from an android device, you would not be able to get the SSO credentials required by the driver to connect to SQL server. The setting you referred to works only if the java program trying to connect to the DB is on a windows machine, which is clearly mentioned by the error message.

Unless your application has authorization based on the SSO user connecting to the DB, you should have an SQL Server user-based authentication mechanism to connect to the server and all authorization procedures should be tied to this user.

Solution 2:

You might have to give the username also.

"jdbc:jtds:sqlserver://192.168.56.1/MyMovies;instance=SQLEXPRESS;user=foo"

Post a Comment for "Java.sql.sqlexception: Single-sign-on Is Only Supported On Windows. Please Specify A User Name"