use msdb
CREATE USER "Group_or_USer" FOR LOGIN "Group_or_USer"";ALTER ROLE SQLAgentReaderRole add member "Group_or_USer""
use [Database]
SELECT N'GRANT VIEW DEFINITION ON '
+ QUOTENAME(SPECIFIC_SCHEMA)
+ N'.'
+ QUOTENAME(SPECIFIC_NAME)
+ N' to "Group_or_User";'
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_TYPE = 'PROCEDURE';