Resetting the SA password in Microsoft SQL Server

You cannot change the SA password in Microsoft SQL server like you do a users password.

To change the SA password you need to run the following command from a DOS prompt.
You will of course need to have some sort of SQL client installed.

C:> OSQL -E -S -dmaster -n -iC:\temp\sa.sql

where sa.sql contains

sp_password @new = 'will_never_forget_again', @loginame = 'sa'

> From http://vyaskn.tripod.com/administration_faq.htm#q9

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s