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


SSIS Package Question


SSIS Package Question

Author
Message
qew420
qew420
Say Hey Kid
Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)

Group: General Forum Members
Points: 701 Visits: 643
Hi,

(Step I) I'm building a Package where I need to run Query to update a table say "mytable1"

Mytable is a tmp table

(Step 2) then I need to run a store procedure which will update certain records in "mytable"

(Step 3) : Send the data to network drive as a text file

Is it possible to design all this in SSIS package ? (I know yes)

I'm able to design Step I by Datasource

then I need to run store procedure which depends on the sucess of Step 1- how to do this step? because I still have to create the text file which is step3


Please let me know ASAP, thanks
Evil Kraig F
Evil Kraig F
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39315 Visits: 7660
qew420 (11/15/2010)
Hi,

(Step I) I'm building a Package where I need to run Query to update a table say "mytable1"

Mytable is a tmp table


You're already in trouble. SSIS should not be working with #tmp tables outside of a *single* Execute T-SQL object. It does not guarantee a consistent batch.


(Step 2) then I need to run a store procedure which will update certain records in "mytable"


Using a staging table, instead of a #tmp, this will be easy.


(Step 3) : Send the data to network drive as a text file


You'd use the updated data and then ship it to a text file that you could adjust as a variable in scripts as to the exact name/location if you like.


- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Raunak Jhawar
Raunak Jhawar
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6537 Visits: 1944
Craig has answered you question completely. As a matter of design...create table --> Stage Data-->Data Transformations-->Truncate Table

Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (111K reputation)SSC Guru (111K reputation)SSC Guru (111K reputation)SSC Guru (111K reputation)SSC Guru (111K reputation)SSC Guru (111K reputation)SSC Guru (111K reputation)SSC Guru (111K reputation)

Group: General Forum Members
Points: 111722 Visits: 13338
Craig Farrell (11/15/2010)
You're already in trouble. SSIS should not be working with #tmp tables outside of a *single* Execute T-SQL object. It does not guarantee a consistent batch.


If you set the property RetainSameConnection to True of the corresponding connection manager, there should be no problem. (if all task/components that use the temp table have the same connection manager of course)


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
Evil Kraig F
Evil Kraig F
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39315 Visits: 7660
da-zero (11/16/2010)
Craig Farrell (11/15/2010)
You're already in trouble. SSIS should not be working with #tmp tables outside of a *single* Execute T-SQL object. It does not guarantee a consistent batch.


If you set the property RetainSameConnection to True of the corresponding connection manager, there should be no problem. (if all task/components that use the temp table have the same connection manager of course)


w00t Whoopsies! Thanks for that correction Da-Zero.


- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
qew420
qew420
Say Hey Kid
Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)Say Hey Kid (701 reputation)

Group: General Forum Members
Points: 701 Visits: 643
thanks all
I'll try out and will update you all
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