I'm working on a project to add some permission-based roles to our database servers to restrict users from modifying data if they don't need to be doing so. I've got four groups for each client; Users, PreProd Users, Data Admins, and PreProd Data Admins. I've got things set up fine for the users, but I'm running into some trouble with the Admin side.
I'm very new to SQL, so a lot of my testing is trial and error. I think I may have botched something quite badly though. Two of my Logins, demo_Data_PP_Admin, and demo_Data_Admin, seem to be stuck. When I paste my script in to CREATE those logins, I am told that the logins already exist. Visually, I can confirm they do not exist. Attempts to
DROP LOGIN [demo_Data_PP_Admin] or
DROP LOGIN [demo_Data_Admin] are met with
Msg 15151, Level 16, State 1, Line 1 Cannot drop the login 'dh\demo_Data_Admin', because it does not exist or you do not have permission.
I know this is a super confusing issue, and I'm trying to sort it all out myself with my relatively beginner knowledge here.
TL;DR, the command
CREATE LOGIN [dh\demo_Data_Admin] FROM WINDOWS WITH DEFAULT_DATABASE=[master]
GO has a red underline beneath [dh\demo_Data_Admin], claiming the login already exists, but I can visually confirm that it does not.
I can try my best to answer any questions that people may have. Again, I apologize for the confusing nature and potentially confusing explanation of events. An answer to this question will likely lead to another question as well.