Wednesday, October 15, 2008

Changing the SA password on MSDE SQL Database

A client was moving their MSDE SQL database to another server and needed to do the backup and restore but had lost the SA password. It can be reset quite easily with the below command.

From the Windows command prompt, logged in with local admin privileges, key in: OSQL -Q"EXEC sp_password @new='yournewpassword',@loginame='sa'" -E

C:\Documents and Settings\Administrator>OSQL -Q"EXEC sp_password @new='yournewpassword',@loginame='sa'" -E
Password changed.

No comments: