I want to create SQL Server Agent jobs programmatically. I am using the following code, while running it doesn\'t throw any error but when I check SQL Server Agent I don\'t see
for the error you are seeing for The EXECUTE permission was denied.... please open SSMS and execute the following code on a query tab:
GRANT EXEC on CreateSQLAgentjobs to PUBLIC
and remove it from the proc