1

I want to deny an AD account to delete any record in sql server. How can i do that? DENY DELETE TO [usergorup\username] did not work. Is there another way?

  • 2
    What permissions are currently granted? Accounts can't delete data without having permission to do so. – George.Palacios Jul 11 at 10:11
  • There is a SQLDML permission on the User Mapping -> Database role membership for. How can i find that SQLDML permission? Where does it take place? Thank you. – Omer Jul 11 at 10:13
  • 1
    When you say it "didn't work", what exactly have you tried and what happened? – George.Palacios Jul 11 at 10:16
  • 2
    Could you produce a minimal reproducible example please? – George.Palacios Jul 11 at 10:19
  • 3
    DENY DELETE TOonly denies the user in the current database where you execute the statement. Not the entire server/login. – Randi Vertongen Jul 11 at 10:22
1

I solved my issue by executing "DENY DELETE TO [UserGroup\UserName]" statement one by one in every databases on the server. It will solve your issue if you have same situation like this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.