Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't login to SQL Server with Windows Authentication [closed]

I've just installed SQL Server 2012 and open the SQL Server Management Studio and when I try to login this problem occurs:

Can't connect to .....

My question is how can I know what is the server name?

And when I go to the SQL Server Configuration Manager I can't find the SQL Server services which should exist !!

Any answer ?

Thanks.

like image 502
Yassering Avatar asked May 18 '13 07:05

Yassering


People also ask

How do I log into SQL Server with Windows Authentication?

Open SQL Server Management Studio. In Connect to Server, select Database Engine, enter your SQL Server name, and enter administrator credentials to connect to the server. Select Connect. In Object Explorer, expand the SQL Server, expand Security, right-click Logins, and then select New Login.

How do I fix Microsoft SQL Server Login failed?

Click Security in the list on the left. Select SQL Server and Windows Authentication mode on the right and click OK. Click OK to close the warning about restarting SQL Server. Right-click on the server name (ie COMPUTERNAME\ACCTIVATE) and choose Restart and click Yes to restart SQL Server.


1 Answers

If you installed SQL Express, the correct server name is:

127.0.0.1\SQLEXPRESS

or

YOURMACHINENAME\SQLEXPRESS

If that does not work there are some steps you can take:

Check if the "SQL Server Browser" windows service is activated and running:

  • Go to Control Panel -> Administrative Tools -> Services
  • Open "SQL Server Browser" service and enable it (make it manual or automatic, depending on your needs)
  • Start it.


If that too does not work, you can also check if the TCP/IP protocol is enabled in your SQL Server instance. Follow these steps (tested for SS2012) to make sure:

  • Open "Sql Server Configuration Manager" in "Start Menu\Programs\Microsoft SQL Server 2012\Configuration Tools\"
  • Expand "SQL Server Network Configuration"
  • Go in "Protocols for <YourInstance>"
  • Enable TCP/IP

If you have any problem, check this blog post for details, as it contains screenshots and much more info.

That's it.

like image 112
acdcjunior Avatar answered Sep 19 '22 05:09

acdcjunior