Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

GRANT EXEC or SELECT to sprocs, UDFs and views

By pxdanie,

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'.

Total article views: 170 | Views in the last 30 days: 1
 
Related Articles
FORUM

Select

Select particular table

FORUM

select statements

select statements

FORUM

select query

select query

FORUM

select count

select count

FORUM

Select query

Select query

Tags
miscellaneous    
 
Contribute