Home Forums Article Discussions Article Discussions by Author Discuss content posted by Hakim Ali Delete All Database User Accounts for a Given Server Login RE: Delete All Database User Accounts for a Given Server Login
SQL_Hunt
SSC-Dedicated
Points: 33518
More actions
September 14, 2016 at 3:13 pm
#1900970
Nice Script. If anyone do not want to drop the user just change that to "Select" so that you can check what are the results before droping the user.
select@sql = 'use [' + DB + ']; select user [' + UserName + ']'
Thanks.