?
Solved

Scope of DTS Global Variable and DTSRUN

Posted on 2006-07-08
2
Medium Priority
?
714 Views
Last Modified: 2013-11-30
Dear Experts,

I have created a DTS Package with 2 Global Variables (gvInput & gvOutput) (defined in design mode i.e. using Package Properties).  On execution of the DTS Package the execution result is stored in gvOutput.  

If I execute the package in DTS Designer everything works perfect and gvOutput retains the value, even after closing and reopening EM.

But, if I execute the package through DTSRUN command line utility, everything works perfect, but the values are not retained.

I hope most of the experts might have faced this.

Thanks in advance ;-)
0
Comment
Question by:sankarbha
2 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 1200 total points
ID: 17064973
>>But, if I execute the package through DTSRUN command line utility, everything works perfect, but the values are not retained.<<
That is correct.  Since you have not saved the package they will not be saved.  In much the same way if you had run the DTS Package manually and not saved the package when you closed it.
0
 
LVL 3

Assisted Solution

by:chhapia_chintak
chhapia_chintak earned 300 total points
ID: 17071334
Yes you can pass value to global variable but can not take output when you are running DTS package from outside.

If you want to access the value of gvOutput after execution you can store value of gvOutput in datatable or you can store value of gvOutput to file on server at the end of DTS package execution. So after execution you can access that value.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Suggested Courses

850 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