DBA

Lost Administrator SA password SQL server 2012

Advertisements

There are many blog posts talking about, how to recover “SysAdmin” password in case if it’s lost OR the server is new to you and no idea that has own and access to it. In my case the second option J

In my opinion, it’s very easy to work on GUI instead of command line CMD 🙂 I used a SSMS.

 

Steps:

1. Stop the SQL server agent
2. Take the SQL server in single user mode, earlier version, it’s a bit hard

All programs –> SQL server 2012 –> Configuration Tools –> SQL server configuration manager

Stop the agent and take the SQL server into single user mode.

 

3. Reboot the SQL service
4. Launch the SSMS and don’t click the connect button, you need to cancel it and then click the “New query” window on top of the SSMS and then connect.

If you click the connect button the object explorer will take one connection, Single user mode will allow only one connection. Because of that we need to cancel and click the new query window.

Note: You need to be an OS administrator.

 

 

5. Create a new login and add as an admin

 

CREATE LOGIN XXX WITH PASSWORD=Complex password'

SP_ADDSRVROLEMEMBER XXX,'SYSADMIN'

 

Hope this would help someone.

I’m currently working as a SQL server DBA in one of the top MNC. I’m passionate about SQL Server And I’m specialized in Administration and Performance tuning. I’m an active member of SQL server Central and MSDN forum. I also write articles in SQL server Central. For more Click here

10 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

1 + 8 =

hacklink panel hacklink al hacklink sollet hdxvipizle resim yükleme onwin venüsbet ai nude 1xbet güncel giriş eskort yeşilköy cami avizesi seo paneli soma kömür bahis forum backlink al pgslot สล็อตเวตรง holiganbetvds
hack forum hacklink panel hacklink hacklink cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı saricahali.com.tr cami halısı cami halısı cami halısı cami halısı cami avizesi cami avizesi cami süpürgesi cami süpürgesi cami ısıtma cami ısıtma evden eve nakliyat ofis taşıma seo hizmeti Onwin Rulet Casino Slot Oyna Bahigo 1xbet Deneme bonusu Bahis siteleri Maç özetleri Bahsegel Canlı Casino Siteleri Sweet Bonanza Blackjack Casino Rulet Oyna Canlı Casino takipçi satın al exeboost.com smm panel santenette.com google.com.tr m