i'm trying to connect to a newly installed SQLServer instance by my java application using jdbc. When i try to open a connection the server return this error:
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'sa'.
Error Stack trace:
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'sa'. at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:197) at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:246)
I've already enabled "SQL Server and Windows Authentication mode" option. I also tried to connect to the database server with SquirreL but i had the same problem, but with SQL Server Management Studio i can connect to the db.
I have a SQLServer 2008 R2 express, jdk 6u41 and sqljdbc4.jar JDBC connectors. I've tried the same application in an environment with SQLServer 2008 R2 express, jdk 6u33 and sqljdbc4.jar JDBC connectors and it work fine.
Are there some SQL server configuration that i need to modify?