question

andrew.diniz avatar image
andrew.diniz asked

Why are EXECUTE rights required to use a function?

They're exposed in management studio under "Programmability" below Stored Procedures, but aren't functions read-only constructs? What's the rationale for not governing their usage with READ permissions?
sql-serversecurityfunctions
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Oleg avatar image Oleg commented ·
The functions are not the "read-only" constructs. True, the functions cannot do certain things, such as using a side-effecting operator, but they may perform some calculations and return either a scalar value or a table. Because the function is considered to perform some action(s), it needs to be executed, and thus, the execute permission is required. A stored procedure may be merely selecting some data, but still nobody questions the necessity of the execute permission to it right? Just my 2 cents.
3 Likes 3 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.