Solved

Cannot Login with Windows Authentication and as 'SA' in SQL Server 2005

Posted on 2011-02-20
15
738 Views
Last Modified: 2012-05-11
I am using SQL Server 2005
Server Authentication is 'SQL Server and Windows Authentication mode'

Issue #1:- I cannot login to SQL Server 2005 using Windows Authentication
Error:- Login failed for user '<computername>\<windows username>'

Issue #2:- SQL Server Authentication - sa login password - I don't remember.
If I try some password, 'Login failed for 'sa'" error message pops up

I know that to recover sa password, I need Windows Authentication Login.
Also to do something with Windows Authentication, I need 'sa' login

Only login I have is an user which have permission to only one database, which cannot do these stuffs

Anyway to recover from these two issues in this scenario. ?

Dear Friend, Please help

Raj
0
Comment
Question by:Rajkumar Gs
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 3
  • 2
  • +1
15 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34937249
>Issue #1:- I cannot login to SQL Server 2005 using Windows Authentication
>Error:- Login failed for user '<computername>\<windows username>'

means that login is not defined in the instance OR the login is locked

>Issue #2:- SQL Server Authentication - sa login password - I don't remember.
>If I try some password, 'Login failed for 'sa'" error message pops up

either you specify the wrong password, sa account is locked/disabled, or authentication mode is limited to windows authentication only

so, please check if the sa login is locked, and if mixed authentication is enabled ...
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34937299
Thanks angelIII

Here is the relevant screenshots

Database Properties
Security Settings of Database
sa user's Properties
sa Properties
Raj
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 34937311
well, you seem to be connected somehow .. so you could change the SA password?
0
Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34937326
This is only login that I have 'abaxuser2' which have access to only one database. I tried to change sa's password from this login. But when I tried, I got this message
 Change sa Password Attempt
Raj
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 34937328
ah, that means your login does not have sysadmin permissions.

you will indeed need a login with sysadmin permissions to "fix" the issue ...
as last resort, you would need to reinstall the instance and reattach the database(s) ...
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34937340
hmm...
Thanks AngelIII

My assumption is right. No other way.

I will do that and will be back

Raj
0
 
LVL 26

Expert Comment

by:tigin44
ID: 34937351
did you check the windows  builtin administrator group logins on the sql server? By default this group is added to the logins and have enough privilages to set a users password. If this group didnt didabled or deleted from the sql server you may logon with an account and change the password of sa or create or enable your accouunt's login..
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34937352
Do you mean I need to uninstall SQL Server and install it again ?
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34937361
@tigin44, Where can I check that ?
0
 
LVL 26

Expert Comment

by:tigin44
ID: 34937381
in your position you cant check that by using the sal server tools.. The user dont have enough privilages to process this. You can just login a box with an account listed in the windows administrator group of the sql server and try to connect to the server by windows account. If that group is still there you are lucky you can log in... Generaly for security reasons this group is disabled or deleted. otherwise you should follow the angels proposition...
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34937600
Thanks tigin44
Raj
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 34938251
The SQL Server should be configured to run with a domain user account. That account will have sys admin permissions. To find out which account is running the SQL Services you can see it in the Computer Management console in the Log in As account.

If you right-click the SQL Server Management Studio icon you will have a Run As. Log in with the user ID and password and from there you should be able to do what you want to do.
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34940339
Thanks jumpen, I will try your suggestion when I am back and will post back
Raj
0
 
LVL 23

Author Comment

by:Rajkumar Gs
ID: 34967763
Thanks to all.
This week-end, I planned to re-install SQL Server and will update you back
Raj
0
 
LVL 23

Author Closing Comment

by:Rajkumar Gs
ID: 35123044
Thanks AngelIII,
I reinstalled and it worked

Thanks tigin44 for your comments

Raj
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Creating a View from a CTE 15 49
SQL State HYT00. Timeout expired proplem 8 44
invoke-sqlcmd help 5 33
SqlServer amend PK column 5 14
How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question