August 28, 2009 at 8:49 am
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
August 28, 2009 at 9:54 am
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
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply