Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Login failed for user (Microsoft SQL Server, Error:18456) SQL Server 2005

Tags:

sql-server

I am using sql server 2005. TCP/IP is enabled. windows authentication is being used. while trying to connect the server with the Database Engine as server type, I am getting error message "Login failed for user 'name-pc\account 2'(Microsoft SQL Server, Error:18456)" .

like image 712
user3422209 Avatar asked Jul 09 '26 03:07

user3422209


2 Answers

You may be missing this setting. SQL Server authentication mode is not enabled on my machine by default. (Remember to re-start the SQL server after this change)

enter image description here

like image 121
Joe Lau Avatar answered Jul 11 '26 20:07

Joe Lau


This error means that given windows user 'name-pc\account 2' does not have access to given instance. You can login with 'sa'(if it is enabled otherwise login with other sysadmin account) and check if 'name-pc\account 2' is exists and enabled.

You can also read more about this error and gain more information HERE

Please read the comments too, some important tips and points reached in comments

like image 35
Vahid Farahmandian Avatar answered Jul 11 '26 19:07

Vahid Farahmandian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!