Change password of sa login.

Ddd
Posted by Ddd under Sql Server category on | Points: 40 | Views : 2529
//change password of sa login

//Login to SQL Server with sa login

//The syntax is

sp_password 'old password','new password'

'new password' should not be null or sa.

//close Management Studio and again Login with sa. you have to

//enter new password.

//This syntax can be useful if we Login using Windows authentication
sp_password 'old password','new password','sa'

---------------------------------------------------------------------------
//change password without using the old password.
alter login sa with password='new password'

Comments or Responses

Posted by: PandianS on: 1/25/2011 Level:Silver | Status: [Member] [MVP] | Points: 10
Hi

Nice Information.

Using the system stored procedure(Sp_Password) for this scenario will be removed infuture SQL Server version of SQL Server 2008, So, We can use ALTER statement instead..
ALTER LOGIN <LoignName> WITH 

PASSWORD = '<New Password>'
OLD_PASSWORD = '<Old Password>'
GO
Cheers
www.sqlserverbuddy.blogspot.com


Login to post response