SQL SERVER DBA, Linux and Azure: Grant view defination access for all Stored Procedures in SQL server using SQL script

Grant view defination access for all Stored Procedures in SQL server using SQL script

Grant view defination access for all Stored Procedures in SQL server using SQL script

select 'GRANT VIEW DEFINITION ON ' + quotename(specific_schema)
+ '.' + quotename(specific_name)
+ ' TO ' + '[Domain \Ajeyudu ]'  -- need to change user name 
from INFORMATION_SCHEMA.routines
where routine_type = 'PROCEDURE'

Grant execute  access for all Stored Procedures in SQL server using following  SQL script

select 'GRANT execute  ON ' + quotename(specific_schema)
+ '.' + quotename(specific_name)
+ ' TO ' + '[Domain \Ajeyudu ]'  -- need to change user name
from INFORMATION_SCHEMA.routines
where routine_type = 'PROCEDURE'
 

No comments:

Post a Comment