I have just restored a database backup to my local SQL Server express instance.
When I try to login the following error is given in the log:
Login failed for user 'username'. Reason: Could not find a login matching the name provided. [CLIENT: ]
How can I make SQL Server find the login matching the name I provided?
Other info:
The error message is telling you exactly what's wrong. You are trying to connect to a SQL Server instance, but the account you are trying to use is not defined as a login for that instance.
Answer: In SQL Server, there is a catalog view (ie: system view) called sys. sql_logins. You can run a query against this system view that returns all of the Logins that have been created in SQL Server as well as information about these Logins.
Step 1 − After connecting to SQL Server Instance, expand logins folder as shown in the following snapshot. Step 2 − Right-click on Logins, then click Newlogin and the following screen will open. Step 3 − Fill the Login name, Password and Confirm password columns as shown in the above screen and then click OK.
In order to connect to SQL Server using SQL authentication, a person needs to provide a login and password when they connect. The password for a SQL Authenticated login is stored in the master database.
Please make sure you have selected "SQL Server Authentication" mode for user you created from Server > Security > Logins option.
Another possibility, is that you created the SQL Server login using Management Studio, and the option requiring the user to change the password on first login was checked. If you didn't immediately login with Management Studio, and change the password, then the attempt to login from the other machine is not able to pop up a dialog box to change the password and so it fails.
try it by removing user and create again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With