SQL Server password change script ?

  • Does anyone have or use a SQL Server password change script ?

    The link below is 'build in' for Active Directory Password chanegs and i was wondering if something similar exisits for changing a password in SQL Server.

    The traditional methods have failed to give a desired result 🙁

    C:\Inetpub\AdminScripts>cscript adsutil.vbs set w3svc/anonymoususerpass "Password"

    Thanks

  • well there are two ways to do it via TSQL;

    the preferred way is like this:

    ALTER LOGIN Victoria WITH PASSWORD = 'B3r1000d#2-36';

    the old procedure sp_password can be used as well,a t least until it gets deprecated:

    sp_password @old,@new,@login

    sp_password NULL,'B3r1000d#2-36',,'Victoria' --assumes sa is running it, so old password not needed

    you could put that in a script, is that what you wanted?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 2 posts - 1 through 1 (of 1 total)

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