Sqlserver-dba.com

sp_password and ALTER LOGIN

There is a warning in the SQL Server Books Online – to stop using sp_password, as in future editions , this procedure will cease to be used.

 In effect , sp_password calls ALTER LOGIN.

 To run ALTER LOGIN – an example  is :

 ALTER LOGIN jackvamvas WITH password = ‘hsjo9Bxzh!123’

 In the example above the  user executing code must have CONTROL SERVER permissions – as they are not specifying the old password. But if assigned ALTER ANY LOGIN than the following is acceptable:

 ALTER LOGIN jackv WITH password = ‘hsjo9Bxzh123’

OLD_PASSWORD = ‘7hsjs8jZbu’

I've had to change the

SQL Server Security Policy

Ref:Jack Vamvas (http://www.sqlserver-dba.com)

 


Author: Jack Vamvas (http://www.sqlserver-dba.com)

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact