KNOWLEDGE BASE

Error "Invalid username or password" Signing In to Microsoft SQL Server


Published: 28 Jul 2014
Last Modified Date: 24 Aug 2022

Issue

When you sign in to Microsoft SQL Server, the following error might occur:
[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user '<username>'.
[Microsoft][ODBC Driver Manager] Invalid connection string attribute
Invalid username or password.
Signing in with the same credentials using SQL Server Management Studio will be successful.
 

Environment

  • Tableau Desktop
  • Microsoft SQL Server
  • Active Directory

Resolution

  • Ensure that your user account has permission to access the Microsoft SQL Server database, or that it has permission to impersonate an account that does have access to the server database.
  • Check if the password being used with the account contains the following special characters: [] () , ; ? * ! @ =

Additional Information

Windows Active Directory (AD) accounts must have permission to sign in to Microsoft SQL Server or have impersonation permissions to sign in to the Microsoft SQL Server using different account credentials.

The following article from the Microsoft website lists that with ODBC connection strings, the password cannot contain the following special characters:  [] () , ; ? * ! @ =

https://docs.microsoft.com/en-us/sql/relational-databases/security/strong-passwords?view=sql-server-ver15
Did this article resolve the issue?