In previous post I have mentioned about SQL SERVER 2005 – Vista Ultimate and SQL Server 2005 DEV Edition. There was one simple issue with the installation. I was not able to login using windows authentication method. I was able to successful login using sa username and password.
I kept on receiving following error.
TITLE: Connect to Server
——————————
Cannot connect to SQLAUTHORITY.
——————————
ADDITIONAL INFORMATION:
Login failed for user ‘SQLAUTHORITY\Pinal’. (Microsoft SQL Server, Error: 18456)
For help, click:
——————————
BUTTONS:
OK
——————————
After a while I realize that this may be due to one needs Administrator rights to do any task in SQL Server. I added the my current login as administrator in SQL Server and next time I was able to login successfully using Windows Authentication.
Following diagrams explains the fix.
1. Error while using Windows Authentication
2. Login using SA username and password and go to Security >> New Login
3. Type In Login Name as ComputerName\UserName
4. Click Server Roles and check sysadmin server role, after that click OK.
5. Now login using Windows Authentication and it should work fine.
Reference : Pinal Dave (https://blog.sqlauthority.com)
106 Comments. Leave new
Greate man My problem solve aftetr a long time.
Thanks very much
User “Company\admin” exists in the Windows Administrator group and also available in the SQL server logins but I am still getting the 18456 error, Login failed for user ‘Company\admin’ [CLIENT: ].
Any help would be appreciated.
Had the error 18456 problem. This forum got me the idea that it was indeed a security issue that didnt allow me to log on to the database server (analysis was working fine). So closed it, and restarted with a right click -> run as administrator. Now works like a charm :) easy fix
Thanks a lot. Keep it up!!!
Heloo
i am using windows7 with sql server 2008.
My problem is i couldn’t login by sql server authentication
but i can login by using windows authentication.
If i try to login by sql server authentication login error occurred. The details are given below…. I hope help from here..
Server Name: PRAJITH-PC\SQLEXPRESS
Error Number: 18456
Severity: 14
State: 1
Line Number: 65536
———————————
Thanks in advance…
Prajith
hello my freinds
if you couldn’t login by sql server authentication and you have this error ( Error Number 18456)
this is the solution for your problem
english : https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/change-server-authentication-mode?view=sql-server-2017
francais :
————
Abdelouahed
thanks .. i was looking for this solution from long time..
i right clicked on sql server management studio and clicked on run as administrator. Now problem is resolved, thanks a lot.
i found this solution very helpful. I have resolved my problem of login as ‘windows authentication’ by viewing the given demo. thanks alot.
Run as administrator On win 7 ;)
good solution. It solved the windows authentication mode login issue
i have sucessfully connected to the the server but when it comes to database attatchment there is a error as
“cannot attatch a database with the same name as an existing database”
GOOD…….
Sir ,
I have problem in architecture for sql 2005/2008 server can any one suggest the site
Ossssom thnxxxxxxxxxxx a lot sir it really worked i hav been facing this problm quit long time ago but was never able to figureout what exactly is going wrong and how to handle it but now itz jus a matter of fun………….
thnxxxxxxxxx.
Thanks
thanks a lot for ur guide……
I am not unble access by Sa login .
no yaar its not working any other better solution for this error 18456 please do the need full for me thank u sir
Please help…
same error for two SQL server 2008 R2 , on same computer (virtual PC), i can’t connect two server’s always same error.
Maybe is problem in “name path” server MACHINENAMESERVERNAMEUSER (login)
please help!
THX
What is the actual error message you got? Also why are you having the same version twice in the PC?
Because i think that the best way to connect and learn about connection (two or more DT servers) is if i had two equally system (OS and server)…
Now am stuck here, regardless of reading and doing stuff from luts of tutorial.
thx for replay…
i still can’t connect two server’s