sp_password for 150 dbs | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

sp_password for 150 dbs

How can I write a script which will take password from a text or xls file change the password of databases.I have 150 databases,so its time consuming and to run sp_password individually for all these databases.All these databases have their individual users
sp_helpuser will give you the list of users for one database
if you can include those password into a table (BY DTS you will be able to do this)
then use sp_password to change the passwords
quote:Originally posted by aaronsandy How can I write a script which will take password from a text or xls file change the password of databases.I have 150 databases,so its time consuming and to run sp_password individually for all these databases.All these databases have their individual users

sp_MSforeachdb comes handy in this case, but be aware it is undocumented and MS can remove/change at any time. For eg: EXEC sp_MSforeachdb @command1="print ‘?’ DBCC CHECKDB (‘?’)" Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>