Forum Discussion
do we recover SA credential or create another user?
We are running a SQL server in 2019.I need to recover my SA credential because the third party is not sharing this information due to termination. When I attempted to recover, I found that Windows authentication for SSMS login had been permanently disabled on the server. and not connect to SQL via PowerShell. when try with powershell sqlcmd showing "Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server: Login failed for user 'HAQUETEX-SERVER\Administrator'. Reason: The account is disabled."
But in my troubleshooting, the administrator user is enabled.
We have OS administrator access So, how do we recover the SA credential or create another user?
- olafhelperBronze Contributor
Farhan_Sadiq_Sohan , Windows and SQL Server have different permission system, by default a Windows Admin isn't a SQL Admin.
See Connect to SQL Server when system administrators are locked out - SQL Server | Microsoft Learn for how to fix.
- Farhan_Sadiq_SohanCopper ContributorThis has already tried and error raised is
"Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server: Login failed for user 'HAQUETEX-SERVER\Administrator'. Reason: The account is disabled."
this user is enabled and you see its a member of administaor gorup.
Not sure what prevoius administator has done. Our impression is as we have access to OS level as administrator we should be able retireve our access.- olafhelperBronze ContributorIf you get that error message, then you done it the wrong way. Follow all instructions in the article step-by-step; that works.