Due to enterprise policies, I need to modify all logins pointing to MASTER as default database.
Whoever is pointing to MASTER must point to a different database, such as TEMPDB.
The problem is that I have hundreds of servers running SQL Server 2000 or 2005 (default instance).
Is there a way to do it remotely through vbscript using SQLDMO?
My domain user account has sysadmin privileges against all those instances and I have a TXT file with all servers (one in each line).
Scripting LanguagesMicrosoft SQL Server
Last Comment
chapmandew
8/22/2022 - Mon
chapmandew
wow....out of curiosity, what is the reasoning behind changing everyones default db? You might be able to get away w/ it through DMO or SMO, but you'd have to decide how to connect to each one, and then load up all of the logins, cycle though them, figure out what their default db is, and then change it. I can show you how to do it for a particular instance, but you'd need to run the script on each one of them. Is that something you might be interested in?