When a new hire or existing user needs access to a database or multiple databases. Easiest way is to figure out if there is any existing user whose permissions can be cloned and applied to the new user.
Instructions
The following step works if DBAUtility database is already setup and you are running SQL agent job to capture a snapshot of all user permissions across the entire SQL instance.
USE DBAUtility
EXEC perms.clonePermissions @UserName = N'Domain\user1', -- nvarchar(256)
@NewUser = N'Domain\user2', -- nvarchar(256)
@logintype = 'U', -- char(1)
@CreateLogins = 1, -- bit
@ExecuteScript = 1-- bit