Reset SQL Server SA password with account without sufficient privileges

One Way without Restart Service

I’ve come across a great way of resetting a SQL server “sa” password if you don’t have it, don’t have an account with sufficient privileges to reset it via SSMS, and most importantly, don’t have to stop the SQL services so processing can continue.fkgqx81huis863c-medium1

All you will need is psexec  (in the sysinternals  toolkit) available here à https://technet.microsoft.com/en-us/sysinternals/pxexec.aspx

Once the tools are extracted to a directory on the server:

Psexec.exe –s –i “{full path to the ssms.exe”}

This will start the SQL Management Studio as the NTSERVICE\SYSTEM account … enter the name of the SQL Server (or localhost) and then you’re in … reset the sa password in there

 

Another way

 

  1. Stop SQL Server Service
  2. Start is with 
    net start MSSQLSERVER /m"SQLCMD"
  3. sqlcmd -SServerName\InstanceName
  4. CREATE LOGIN RecoveryAcct WITH PASSWORD=’TempPass1’
    GO
  5. SP_ADDSRVROLEMEMBER RecoveryAcct,SYSADMIN
    GO
    This was on Microsoft SQL Server 2008 (SP2) – 10.0.4067.0 (X64).
     
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...