Reputation: 10720
I'm 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
And I get this error when I try .\SQL
.
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.
Upvotes: 9
Views: 43580
Reputation: 9624
I reset my local SQL server with the following CMD commands:
sqllocaldb stop mssqllocaldb
sqllocaldb delete mssqllocaldb
sqllocaldb start "MSSQLLocalDB"
Upvotes: 0
Reputation: 1
For SQL Server 2019 Express on SSMS, the default format of MSSQL Server Name is:
<Your PC Name>/SQLEXPRESS
This is in my case below:
DESKTOP-HN1U0ME/SQLEXPRESS
For SQL Server 2019 Developer on SSMS, the default format of MSSQL Server Name is:
<Your PC Name>
This is in my case below:
DESKTOP-HN1U0ME
Upvotes: 1
Reputation: 1619
Give server name as "(LocalDb)\v11.0" by selecting windows authentication. Please see the image.
It worked for me with SQLServer 2014.
Upvotes: 0
Reputation: 1
Please enable the administrator Account throngh this command
secpol.msc
and enable admin and log the PC and Login the Administrator account and run SQL Server 2005.
Upvotes: 0
Reputation: 10720
Ran SSMS as Administrator and issue was fixed.. Accepting the previous answer as it guided me to this solution
Upvotes: 10
Reputation: 1157
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
Upvotes: 2