Forum Discussion

Farhan_Sadiq_Sohan's avatar
Farhan_Sadiq_Sohan
Copper Contributor
Dec 03, 2023

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?

    • Farhan_Sadiq_Sohan's avatar
      Farhan_Sadiq_Sohan
      Copper Contributor
      This 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.
      • olafhelper's avatar
        olafhelper
        Bronze Contributor
        If you get that error message, then you done it the wrong way. Follow all instructions in the article step-by-step; that works.

Resources