If you happen to forget your SQL Server password for 'sa' account, then here's a simple query to help you reset it:
GO
ALTER LOGIN [sa] WITH DEFAULT_DATABASE=[master]
GO
USE [master]
GO
ALTER LOGIN [sa] WITH PASSWORD=N'MyNewPassword' MUST_CHANGE
GO
In Case you remember your Old Password and want to change the 'sa' password, use this query:
ALTER LOGIN [sa] WITH PASSWORD = N'MyNewPassword' OLD_PASSWORD = 'MyOldPassword';
GO
A few days ago, I had a painful exprience that I lost sa password on my MS SQL Server database, and I almost took the whole weekend to look for some efficient SA password recovery solutions. I asked friends, searched on Internet and even bought some books... Fortunately, I finally got MS SQL Server Password Unlocker and it instantly changed the SA password but no data loss. Besides, I also got a couple of good "recover SA password" solutions in order to save your weekend in case you have lost or forgot MS SQL Server passwords (SA password!)
ReplyDeleteI also know a software which can also reset forgotten SA password, it's called SQL Server Password Changer, it's worth a try.
ReplyDelete