Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 SQL admin/sa password reset

Author  Topic 

sqlpal2007
Posting Yak Master

200 Posts

Posted - 2011-11-21 : 10:50:44
Hello All,

Do anyone know how to change the sa password at one time across all the SQL servers?

Can this be done using SQL script or system commands? Is there any affordable third party tool for this?

Thanks much,
Indy

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-11-21 : 13:18:30
Do you have a CMS server setup? That's what we use to quickly change it on hundreds of servers.

Or you can easily do this via a batch file calling sqlcmd. You can have it loop through your servers via a file that contains each server name.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2011-11-21 : 13:22:57
You could use powershell to build a script that loops through each server and updates the password.
Go to Top of Page

sqlpal2007
Posting Yak Master

200 Posts

Posted - 2011-11-21 : 21:14:15
Thanks all for suggestions.

Do you have sample of batch file or powershell script which can refer?

Thanks,

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-11-21 : 21:16:47
This will get you started on the batch file approach: http://weblogs.sqlteam.com/robv/archive/2003/09/28/181.aspx

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -