2

What is the result of an instruction like the following on SQL Server 2008+?

GRANT SELECT TO role 

(without specifying ON object!)

The 'Command(s) completed successfully.'

My tests have concluded that the role will have SELECT permission on ALL past and future objects - TABLES, VIEWS, etc.

Is this true?

Dylan Corriveau
  • 2,561
  • 4
  • 29
  • 36
RafaelaKA
  • 21
  • 1
  • 4
  • Yes, that is the way it works. `GRANT EXECUTE TO role` does the same thing for execute permissions on stored procedures - existing and future ones. – marc_s Feb 16 '15 at 17:03
  • If you don't specify an object, it sets it at the database level. So it is equivalent to any object capable of having select granted to it in that database being granted to that role. – Xedni Feb 16 '15 at 18:31
  • Thank you very much for confirming. – RafaelaKA Feb 17 '15 at 21:27

0 Answers0