all groups > sql server dts > march 2007 >
You're in the

sql server dts

group:

script for ftp


script for ftp SAC
3/21/2007 9:17:08 AM
sql server dts:
I made a batch file which runs an ftp script. I'd like to put this either
into a sp. Not sure how to go about this.

Here's the batch file:

ftp -i -s:c:\laufer.txt laufer.com > c:\laufer.log

It uses this laufer.txt

The laufer.txt is:

<User Name>
<Password>
ascii
lcd c:\temp
cd /EDIOUT/TRANPRO
Mget *
quit

I tried using the ftp task and can get connected but I nned to change
directory and the download a file and save that file to a specific directory
(c:\temp) in this sample.

Any help would be appreciated.

Thanks.



Re: script for ftp narayaana
3/21/2007 3:53:47 PM
2 ways to do so:
1-
your package is small, when you run the package (I suggest you connect to
SSIS service, write click on package (import it if necessary), run ...
you are invited to change connection strings (to files, variables etc.) in
section "Connection Manager"
a command line is generated, you can copy it!
modify from this model!

2-
use SSIS > Package Configuration in Visual Studio management,
you can then save the value in an xml config file, an environment var etc
(just once you are in SSIS > Package Configuration management, press on help
;))

[quoted text, click to view]

Re: script for ftp SAC
3/21/2007 4:49:42 PM
Sorry, I forgot to tell you that this is 2000.

[quoted text, click to view]

Re: script for ftp narayaana
3/22/2007 12:00:00 AM
Quite not the same and regarding SSIS current handling I would say a bit
easier in you case,

At run time you can re-specify Global Variables values in dtsrun command
line
Packages Global variables can be set in Package > Properties > Global
Variables Tab.
not in detail but grossly, for a Global Variable of type string: add to
dtsrun: /A VarName:8=Value (8 stands for string type, see help > dtsrun
utility)

you can then use a dynamic property task object to dynamically affect these
Global Variables to other task in the dts and in particular to ftp transfer
task.
Note: dynamic properties task can use other sources than Global Variables
such as ini file, sql query, environement vars etc..
I usually have to use per database specific parameter values, which is why I
would tend to use Sql Query in SQL2000 times...


[quoted text, click to view]

Re: script for ftp SAC
3/29/2007 1:59:52 PM
Thanks! Got it!
[quoted text, click to view]

AddThis Social Bookmark Button