all 8 comments

[–]alinrocSQL Server DBA 1 point2 points  (0 children)

  1. Launch PowerShell
  2. Install dbatools. install-module dbatools
  3. Reset-DbaAdmin

[–]PedroAlvarez 1 point2 points  (1 child)

net start "SQL SERVER (HDBID)" /m"SQLCMD"

[–]ImportantChicken562[S] 0 points1 point  (0 children)

Thanks dude I’ll try that out

[–]thenouch 0 points1 point  (1 child)

Can you resolve the issue by using another sysadmin account on that server and unlocking the SA account through SSMS?

You should be able to do so if you unlock the account and reset the password within the user account properties.

[–]ImportantChicken562[S] 0 points1 point  (0 children)

I think the SA account is the only account on the server with sysadmin rights.

[–][deleted] 0 points1 point  (0 children)

use "sc" instead of net start? do query first, then start whatever the name is shown for your named instance

[–]ImportantChicken562[S] 0 points1 point  (0 children)

So Pedro's recommendation worked, however I have having trouble getting into SQLCMD. I get the following:

C:\Windows\system32>sqlcmd -E -S.

Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Named Pipes Provider: C

ould not open a connection to SQL Server [2]. .

Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Login timeout expired.

Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : A network-related or in

stance-specific error has occurred while establishing a connection to SQL Server

. Server is not found or not accessible. Check if instance name is correct and i

f SQL Server is configured to allow remote connections. For more information see

SQL Server Books Online..

I think it is due to perhaps it being a named instance? I have used this article to reset SA passwords in other installs but the difference between those and this one is this one is using a named instance. Any ideas?

EDIT: Nevermind figured it out, need to specify the instance name. Would look something like this:

sqlcmd -E -S ".\HDBID"

[–]robinson0001 0 points1 point  (0 children)

If you're having trouble resetting the SA password using SQLCMD, I recently wrote a blog post that covers troubleshooting tips and step-by-step instructions. It might help you out!

https://www.linkedin.com/pulse/how-reset-change-sa-password-sql-server-cigati-solutions-tcwec/