Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SSIS and Import/Export (2012)
 Set global variable and file name in DTS

Author  Topic 

sasi4frendz
Starting Member

1 Post

Posted - 2013-09-12 : 18:11:54
Hi All,

Greetings!!!

I am new to DTS and i need some help regarding the following

Our environment is SQL 2008 but we have 2005 backward compatability pack on our server so we have dtsrun.exe.

We have the DTS placed on a shred drive and by using xp_cmdshell we run the dts packages. Our application was based on MS Access before and now we are trying to migrate to Java. We have a stored procedure that we call from java to run the DTS.The Java application will run on a unix machine.

Currently we are able to execute the DTS from the java application but we are facing difficulties updating the global variables. I tried this

exec databasename..xp_cmdshell 'DTSRun.exe /a VariableName:String="21713-1" /f "D:/DTS/Load table.dts"'

but when i execute this the query is running for long time and nothing is happening.

I also have one more DTS, which accepts the input file and updates the tables. The user can browse the file from any location and upload.
In the DTS, if i right click for the connection properties we have a kept the datasource as text source and hardcoded a file name now. How can we update the file name location from java.

This is what we have in Access application
myPkg.Connections("Load File").DataSource = stFile

Please help

   

- Advertisement -