SQL 2005 Agent Job using config variable for TSQL step


I have a job that I am running and 1 step has a config file, but I need another step to pull a variable from this same config file but the step is just a call to a SP (yes I need it to pull from config file) so I do not want to create another package just to call a SP when I can just use the TSQL step in the Agent Job.

I just need to know how to grab a variable from the config file when it runs from the TSQL code somehow
LVL 16
Who is Participating?
Brendt HessConnect With a Mentor Senior DBACommented:
No can do - at least, not the way you are thinking of.  Make a global (package-wide) variable in your package, and when you are loading data in the step that uses the config file, load the value you will need later into your new global variable.  Then pass the value of that variable to the stored procedure as a parameter.
brad2575Author Commented:
Giving points for trying to help.  As you said I couldn't do it that way, so just created an SSIS pkg with these steps and it worked, wanted to avoid an unnecessary package though.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.