Based on moffan76's script to GRANT EXEC to all sprocs and UDFs (that EXEC) and GRANT SELECT to views and UDFs (that SELECT). This script uses that same general technique of selecting the object names from sysobjects, but does it in one step w/o using a cursor. It is also not wrapped in a sproc like maffan76's. There is one correction to maffan76's as well - adding the table valued UDFs - type 'TF'.
2007-10-02 (first published: 2002-06-20)
15,449 reads