Changing the SA password

  • Hi all,

    Can anyone tell me how to change the sa password on 2005?  I have tried a normal alter login statement but it was not successful.  Is there another way?

    Thanks,

    Paula.

  • You can use SSMS to change the password. Move to the folder security and logins where you will find the sa user right click and properties and change password.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • Thanks for that.  Don't know why I thought that wouldn't work - it just seemed too simple somehow! 

    Thank you!

  • You should set a complex password by default for sa did you do that.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • Yes, thanks.

  • I while ago, I picked up the following practice:

     - Create a SQL authenticated "DBA" login, give it SysAdmin rights, use it whenever I need to use such a thing.

     - Generate a horribly strong password (I use PasswordSafe, it makes generating things like

          bo/rSwKS|]&spri^5GbnmQa<

    a snap), assign it to the SA account, and don't record it anywhere.

    This removes all temptation of using the SA account. (Of course, anyone with SysAdmin rights can change it to "" any time they want, but at least it's a start.)

    I've also heard that in 2005 you can rename the SA account to something else, which is also a good idea. Blocking or hiding the "public" administration logins that everyone (i.e. all the hackers) know about is a good idea.

       Philip

     

  • Either of these commands will change the SA password in 2005.  SP_PASSWORD works with earlier versions of SQL Server.

    exec sp_password  @new = 'MyNewPassword' , @loginame = 'SA'
    alter login SA with password = 'MyNewPassword'
     
     
  • You can also disable the sa login altogether in SQL Server 2005 (like you can disable the Administrator account on Windows Server 2003).

     

    K. Brian Kelley
    @kbriankelley

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply