SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


need urgent help SSIS


need urgent help SSIS

Author
Message
Mr. Kapsicum
Mr. Kapsicum
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3786 Visits: 1061
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
MarkusB
MarkusB
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21885 Visits: 4208
Use the "File System task" from the SSIS toolbox.

Markus Bohse
Mr. Kapsicum
Mr. Kapsicum
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3786 Visits: 1061
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.
MarkusB
MarkusB
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21885 Visits: 4208
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
Mr. Kapsicum
Mr. Kapsicum
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3786 Visits: 1061
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).
MarkusB
MarkusB
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21885 Visits: 4208
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
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)

Group: General Forum Members
Points: 147120 Visits: 13350
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?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Mr. Kapsicum
Mr. Kapsicum
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3786 Visits: 1061
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.
MarkusB
MarkusB
SSC-Insane
SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)SSC-Insane (21K reputation)

Group: General Forum Members
Points: 21885 Visits: 4208
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
Mr. Kapsicum
Mr. Kapsicum
Hall of Fame
Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)Hall of Fame (3.8K reputation)

Group: General Forum Members
Points: 3786 Visits: 1061
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search