I need to update the roles for all database logins, but without using SQL Server Management Studio. I can update a single user with the following example SQL.
EXECUTE sys.sp_addsrvrolemember
@loginame = N'User1',
@rolename = N'dbcreator';
But how I can do this for all users? Is there a way to select the names of all the users and then loop through the list and update them all?