Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

need urgent help SSIS Expand / Collapse
Author
Message
Posted Friday, September 6, 2013 2:50 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, September 25, 2014 5:50 AM
Points: 466, Visits: 610
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
Post #1492090
Posted Friday, September 6, 2013 3:11 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 2:54 AM
Points: 4,427, Visits: 4,172
Use the "File System task" from the SSIS toolbox.

Markus Bohse
Post #1492099
Posted Friday, September 6, 2013 3:35 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, September 25, 2014 5:50 AM
Points: 466, Visits: 610
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.
Post #1492115
Posted Friday, September 6, 2013 3:38 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 2:54 AM
Points: 4,427, Visits: 4,172
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?


Markus Bohse
Post #1492119
Posted Friday, September 6, 2013 3:46 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, September 25, 2014 5:50 AM
Points: 466, Visits: 610
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).
Post #1492128
Posted Friday, September 6, 2013 3:54 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 2:54 AM
Points: 4,427, Visits: 4,172
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.


Markus Bohse
Post #1492132
Posted Friday, September 6, 2013 3:59 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:15 AM
Points: 13,017, Visits: 10,800
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.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1492135
Posted Friday, September 6, 2013 4:09 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, September 25, 2014 5:50 AM
Points: 466, Visits: 610
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.
Post #1492139
Posted Friday, September 6, 2013 4:48 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 2:54 AM
Points: 4,427, Visits: 4,172
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.


Markus Bohse
Post #1492156
Posted Monday, September 9, 2013 4:38 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Thursday, September 25, 2014 5:50 AM
Points: 466, Visits: 610
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.
Post #1492726
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse