0

I know that you can grant a role:

  • Other roles
  • System privileges
  • Object privileges

But, can you grant to the same role all at once? I mean, for example you grant a role:

  • 2 roles
  • 1 system privilege
  • 1 object privilege

Is this possible?

If so, what is the priority of the grants? Are roles the top priority, or the privileges?

1

Yes, you can grant as many roles or privileges to a role as you want. The order or priority does not matter because a role or privilege always permit something. Unlike for example Windows file permissions you don't have "allow write" and "forbid write" - where the priority/precedence matters.

Either the role gets a privilege or he does not.

However, you can create ROLES as use the ROLE as marker in PL/SQL at DBMS_SESSION.IS_ROLE_ENABLED(...), there is would be possible to "restrict by granting" and the order and priority could matter. But such design would be quite ugly and is not recommended.

| improve this answer | |
  • maybe I didn't understand your question, but I was referring to assigning roles and privileges to ROLES, not users. I don't if with roles you have the same scenario (if you can assign roles+privileges to an user) @Wernfried Domscheit – Adrián Jaramillo Dec 9 '19 at 23:12
  • 1
    Yes, you can grant roles to other roles or grant roles to users. You can grant privileger to roles or users and you can mix all of them. – Wernfried Domscheit Dec 10 '19 at 6:03

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.