[Webinar] Learn how to a build a cloud-first strategyRegister Now


SQL 2005 Agent Job using config variable for TSQL step

Posted on 2011-10-11
Medium Priority
Last Modified: 2012-06-21

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
Question by:brad2575
LVL 32

Accepted Solution

Brendt Hess earned 2000 total points
ID: 36950050
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.
LVL 16

Author Closing Comment

ID: 36979557
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.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question