So for starters, sorry if this in the wrong section, I feel this would be the best way to do this. I have been doing research online and I can't seem to find anything that quite fits what I am trying to do so I turned here.
Let me begin this by saying we are trying to give our developers the access to run SQL agent jobs that are related to their Databases, and we are trying to do this without granting them Agent Operator Permissions. We are looking at doing this by creating a stored procedure that calls the correct SQL Agent job. Now here is where I am running into my issue. A little more background, we are running MSSQL 2014 on these servers and are using SSISDB and environments. So with that in mind, I have to directions I am thinking of going. The first is to create multiple Agent jobs, pointed to the different environments needed, and then have a parameter that just starts the specific Agent job.
Then next way I am thinking of doing it is actually my question. Inside the SQL agent, there is a drop down menu where you can select the different environments (picture provided). Because of this, I know there would be a way to change the variable on the Fly. My question is, what table is this stored in? I have been looking inside both MSDB and SSISDB and can't seem to find it. Once I get that, I know I could hack something out that works.
Sorry for the long post, trying to explain as much as I can. Thanks.