September 6, 2013 at 2:50 am
create SSIS package that copies file from server (configurable location) to a folder on network shared drive.
After file is copied from source to destination SUCCESSFULLY, delete the source file
September 6, 2013 at 3:11 am
Use the "File System task" from the SSIS toolbox.
[font="Verdana"]Markus Bohse[/font]
September 6, 2013 at 3:35 am
That i know, but an architecture with idea of how to make it configurable will be a help.
i.e. package is in working condition while moving from one machine to other.
September 6, 2013 at 3:38 am
Not sure I understand what you want. Do you want to make then file and\or path configurable? The use SSIS variables.
Or do you need to move the package to another server?
[font="Verdana"]Markus Bohse[/font]
September 6, 2013 at 3:46 am
MarkusB (9/6/2013)
Not sure I understand what you want. Do you want to make then file and\or path configurable? The use SSIS variables.Or do you need to move the package to another server?
I want to create a package that copies file from server (configurable location) to a folder on network shared drive.
After file is copied from source to destination SUCCESSFULLY, delete the source file.
And this package should be made into a utility that can be used on some other machine just by doing some modifications(like source name and destination name).
September 6, 2013 at 3:54 am
I hope I get it right now.
Create your package with two "file system tasks" connect them with an "on success" connection.
Then define a variable "sourcepath" and change the sourceconnection properties. Use an expression which refers to your variable.
If necessary do the same for the destination.
To run the package from another machine use dtexec.exe.
[font="Verdana"]Markus Bohse[/font]
September 6, 2013 at 3:59 am
MarkusB (9/6/2013)
I hope I get it right now.Create your package with two "file system tasks" connect them with an "on success" connection.
Then define a variable "sourcepath" and change the sourceconnection properties. Use an expression which refers to your variable.
If necessary do the same for the destination.
To run the package from another machine use dtexec.exe.
To expand on the excellent suggestions of Markus:
you can use the /SET option of DTEXEC to set the variables.
Keep in mind if you call DTEXEC on another machine, the package will be executed on that machine. So this machine must have access to the network drive.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
September 6, 2013 at 4:09 am
MarkusB (9/6/2013)
I hope I get it right now.Create your package with two "file system tasks" connect them with an "on success" connection.
Then define a variable "sourcepath" and change the sourceconnection properties. Use an expression which refers to your variable.
If necessary do the same for the destination.
To run the package from another machine use dtexec.exe.
That was Great.
need another help.
now, my destination has the files. and with time it will start increasing.
what is want is, to delete all the files from that folder which are older than 7 days.
September 6, 2013 at 4:48 am
That part is a bit more tricky. Do the filenames contain a date or do you need to get it from the file attributes?
I would say using a script task is the way to go.
[font="Verdana"]Markus Bohse[/font]
September 9, 2013 at 4:38 am
MarkusB (9/6/2013)
That part is a bit more tricky. Do the filenames contain a date or do you need to get it from the file attributes?I would say using a script task is the way to go.
no, they dnt have any naming convention.
Anyways, hv found the answer for this. used script task.
thanks for ur reply.
September 9, 2013 at 6:38 am
Mr. Kapsicum (9/6/2013)
That was Great.
need another help.
now, my destination has the files. and with time it will start increasing.
what is want is, to delete all the files from that folder which are older than 7 days.
Here's what I do. I insert the attached script file as a Script task. The script is courtesy of an unknown contributor on the Internet.
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply