Carlos_Felipe
asked on
Modify default database for all logins
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).
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).
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?
ASKER
Please, share it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks! You helped me a lot!
Does it not work on SQL 2000?
Does it not work on SQL 2000?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.