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


SSIS Package Execution


SSIS Package Execution

Author
Message
cvkk2010
cvkk2010
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 9
Hi All,

I need help to execute a taxk.

I have text file which has SQL Statements something like

Select top 10 * from Table 1
Select top 10 * from Table 2
Select top 10 * from Table 3
Select top 10 * from Table 4

I want to create a package which has to execute all the sql statements and return all the output in 4 different flat files.

Please advice
Eirikur Eiriksson
Eirikur Eiriksson
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: General Forum Members
Points: 20737 Visits: 18791
cvkk2010 (4/30/2014)
Hi All,

I need help to execute a taxk.

I have text file which has SQL Statements something like

Select top 10 * from Table 1
Select top 10 * from Table 2
Select top 10 * from Table 3
Select top 10 * from Table 4

I want to create a package which has to execute all the sql statements and return all the output in 4 different flat files.

Please advice



Quick questions, are all the source tables the same structure? Do all the queries return the same structure? Are all the destination flat files of the same structure? Is the statement file a prerequisite for the operation or only the statements? Will the statements change in any way shape or form from one run to another?
Cool
cvkk2010
cvkk2010
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 9
Hi Eirikur,

All the tables are on same database and each table has different structure.

All the three queries are going to return different set of data

eg. 1st table will return Employee information
2nd table will return Case details
3rd table will return metrics information

The flat file contains only select statements and all the statements jus throw some data.

Please advice :-)
Koen Verbeeck
Koen Verbeeck
SSC-Dedicated
SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)SSC-Dedicated (34K reputation)

Group: General Forum Members
Points: 34077 Visits: 13270
SSIS will be difficult to use for this, since the data fow cannot handle changing metadata.
I would simple import the queries from the flat file into the database, loop over them and put an appropriate INSERT statement before each one.


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
cvkk2010
cvkk2010
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 9
Thank you very much Koen Smile
Eirikur Eiriksson
Eirikur Eiriksson
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: General Forum Members
Points: 20737 Visits: 18791
I would recommend a dynamic package or in other words, programmatically generated packages. This is fairly straightforward from a script task in a master package.
Cool
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