com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'user2'.

tip

If you're not using yet, consider using the SQLServerDataSource to set your server configurations. Also, check if the server is accepting TCP/IP connections and if there's no firewall blocking the connections.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • SqlServer: Login failed for user
    via by jim shirreffs,
  • Java y Sql Server
    via by Unknown author,
  • SQL Server jdbc connection
    via Stack Overflow by yatinbc
    ,
    • com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'user2'. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSParser.parse(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(Unknown Source) at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:582) at java.sql.DriverManager.getConnection(DriverManager.java:207)

    Users with the same issue

    odd
    odd1 times, last one,
    drFaust
    drFaust1 times, last one,
    musketyr
    musketyr1 times, last one,
    balintn
    balintn2 times, last one,
    Unknown visitor1 times, last one,
    124 more bugmates