One of our developers with blanket privilege on a database wanted to create a regular user mapped to a login when what he mistakenly created was a user without login and now I'm unable to remove the user. DROP USER XX
command runs forever with no result nor an error. The user doesn't own any schemas as well. How can I remove this user?
Thank you
-
what you are getting the error?– Md Haidar Ali KhanCommented Oct 18, 2016 at 7:59
-
"command runs forever with no result nor an error"– StackoverflowuserCommented Oct 18, 2016 at 8:01
-
Do you have "ALTER ANY USER permission on the database of that user".– Md Haidar Ali KhanCommented Oct 18, 2016 at 8:05
-
I hope this isn't a production db that a developer has 'blanket' permissions on. Hearing that anywhere makes me choke on my morning coffee.– Ian_HCommented Oct 18, 2016 at 8:32
-
I'm SA. It's UAT.– StackoverflowuserCommented Oct 18, 2016 at 10:28
|
Show 4 more comments
1 Answer
Check for any blocking SPID
s when you have issued the DROP USER XXX
command.
Then kill.