Change Password for SQL Server User
bob on August 29th, 2008
Using Query Analyzer it is easy to coordinate with the database server while you would like to change the password, to change the SQL Server User name password, just connect to the database with Query Analyzer using the SQL Server Username that is being updated and the current password. Then run “sp_password” to change the password. This approach provides the flexibility to change the password at the most appropriate time for the application.
sp_password [ [ @old = ] ‘old_password’ , ]
{ [ @new =] ‘new_password’ }
[ , [ @loginame = ] ‘login’ ]
The Office Microsoft Documentation for sp_password
Here is a simple example that changes the current password from
“currentPassword” to “newPassword”;
sp_password ‘currentPassword’, ‘newPassword’
However make sure to use a strong password, “newPassword” is just an example. For a quick test to confirm that the new password is working, close Query Analyzer and then re-connect with the new password. That is all there is to it, except for changing your connections string.
It is obvious, but still critical to remember to change the password in your connection string if this SQL User name is used in your code. Once the password has been changed and tested with Query Analyzer, update the connection string with the new password and test that everything still works correctly, and you’re done.




November 18th, 2009 at 11:23 am
good work i was searching for this
February 16th, 2010 at 8:26 am
Students do opine that the argument essay composing supposes the most time consuming process. However, people rely on the custom writing service assistance anytime when that’s demanded.