Solved

Scope of DTS Global Variable and DTSRUN

Posted on 2006-07-08
2
682 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 400 total points
Comment Utility
>>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 100 total points
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now