Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to Connect to Local SQL Server with Windows Authentication using SSMS

I am trying to login to my local SQL Server 2005 installed on Windows7 using SSMS using Windows authentication.

I tried using various server names like ., localhost, .\SQL, ANANTH-PC etc.

I get this error when I try . or localhost

enter image description here

and I get this error when I try .\SQL

.enter image description here

I had gone for default instance and Windows authentication when I installed SQL Server.

I've checked the service in the SQL Server Configuration manager and find that MSSQLSERVER is running.

How can I find the server name that I should enter to login to SQL Server? Any help ?

Error is loged as

2012-01-26 15:07:16.02 Logon       Login failed for user 'Ananth-PC\Ananth'. [CLIENT: <local machine>]
2012-01-26 15:08:51.06 Logon       Error: 18456, Severity: 14, State: 11.
like image 527
Ananth Avatar asked Jan 26 '12 10:01

Ananth


People also ask

How do I connect to SQL Server using Windows authentication in SSMS?

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.

Why SSMS is not connecting to SQL Server?

Check to see if allow remote connections for this server is enabled. In SSMS, right click on the instance name and select Properties. Go to the Connections tab and make sure Allow remote connections to this server is checked. If you need to make a change, you must restart the SQL Server instance to apply the change.

How do I connect to local SQL Server in SSMS?

Connect to the SQL Server using SSMS Next, from the Connect menu under the Object Explorer, choose the Database Engine… Then, enter the information for the Server name (localhost), Authentication (SQL Server Authentication), and password for the sa user and click the Connect button to connect to the SQL Server.

What is the difference between SSMS SQL Server and Windows Authentication?

SQL Server does not ask for the password, and does not perform the identity validation. Windows Authentication is the default authentication mode, and is much more secure than SQL Server Authentication.


2 Answers

Ran SSMS as Administrator and issue was fixed.. Accepting the previous answer as it guided me to this solution

like image 178
Ananth Avatar answered Nov 03 '22 00:11

Ananth


That should help you find reason. Click: "Show technical details" and look at State number.

http://blogs.msdn.com/b/sql_protocols/archive/2006/02/21/536201.aspx

like image 30
devarc Avatar answered Nov 03 '22 02:11

devarc