Login fails after password reset or new user creation despite updating password in database

Open
#1,392 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
sql
Domain
databases

Research direction

No repository file, test, or entry point is identified; start by determining whether this SQL Server login report applies to a sample in the repository rather than to local server configuration. Done would require a reproducible repository-specific failure and a named sample or test to change.

Written by the indexing model from the issue text.

Description

I am encountering a critical issue where I cannot connect to my SQL Server instance using the sa user, even after resetting the password via SQL Server Management Studio and after creating new users. The error message received is:

pgsql
Copy
Edit
Cannot connect to Mubashir.

Login failed for user 'sa'. (Microsoft SQL Server, Error: 18456)
Details:

The problem occurs when attempting to log in to SQL Server using the sa account.

Password reset attempts for the sa user have been performed both through the application and directly via SQL Server Management Studio.

New users have also been created with known passwords, but login attempts for those users fail as well.

The error corresponds to SQL Server error 18456, indicating login failure due to invalid credentials or possible permission issues.

The issue persists even after verifying that SQL Server services are running and that the login names exist.

No additional errors or messages are shown except the login failure notification.

I have reviewed Microsoft documentation for error 18456 but have not resolved the issue.

What I have tried so far:

Resetting sa password through SQL Server Management Studio.

Creating new SQL Server users with proper roles and passwords.

Checking SQL Server authentication mode (confirmed it is set to mixed mode).

Restarting SQL Server service.

Ensuring no network or firewall blocks.
@microsoft/mssql-server, @mattn, @brettcannon, @gregturn, @SqlChicken, @bradleyh

Dominant language
PowerShell
Stars
11.2k
Forks
9.1k
Avg merge
2d 7h
Merged PRs (30d)
14

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/sql-server-samples

All issues in microsoft/sql-server-samples

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.