Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SSIS Package Execution Flow Problem


SSIS Package Execution Flow Problem

Author
Message
ashutosh152
ashutosh152
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 29
I have created a SSIS package with SQL Task1--->DataFlow Task--->SQL Task2---->.
Task Functionality as follows:-
1. SQL Task1, i am creating a table (if it does not exist in database)
2. DataFlow Task, i am reading a xml file and loading the data into above created table.
3. SQL Task2, i am updating the records in the table.
They are few more operations performed after that.

The normal execution form is going from 1-3-so-on. But when i run the package it executes DataFlow Task first, hence throws the error stating table or view does not exist. It picks the "2nd one" first which is not desired.

I have even tried setting up Precedence (execute DataFlow Task only after successfull execution of SQL Task1)through:-
1. In Control Flow --> Add Precedence Contraint
2. In Package Explorer ---> Precedence Contraint
Even after setting up the Precedence, every time when i run the package, it picks the "DataFlow Task" first instead of SQL Task1.

Please guide me how can solve this problem.
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18899 Visits: 13250
You should post the exact error messages, it would really help us to help you.
My first guess is that the package fails in validation. Try setting the DelayValidation property to False for the dataflow.


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
pmm.sudarsan
pmm.sudarsan
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 105
Hi ,

I have suggestion for this senario.

You are not able to insert the record by using oldeb destination.

Step:1 you rae creating a table by uisng execute sqltask.
Step:2 then you use DT to extract data from xlm and insert the extract data into cretaed table in the sqltask.Here itself you face error.because when you try to map the destination table it wont be there.so your are not a\even run the package with out any error.

My suggestion

step:as you said create a table by using execute sql task
step:2 use the data flow task and insert the extracted data into one record set
Note:you have declare a variable with the data type of object.
Step:3 Come to control flow and drag and drop the for each loop container and select the ADO.net enumerator.Inside the for each loop container drag and drop the execute sql task and write a insert query just pass the values through a varaible.

Ex: Create table test1(column1 varchar(10)) ---Sql task
I have taken a flat file connection manager and set the file path ..In that file i have only one data ...it is "HI", i want to insert the "Hi" into the table test1.
drag the record set destination i have updated the variable which is having the data type of object.

Then foreach loop inside for each loop[ i have sqltask. In that i have written a query as insert into test1 (column1) values (?).
Koen Verbeeck
Koen Verbeeck
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18899 Visits: 13250
pmm.sudarsan:
It is much easier to just set the DelayValidation property of the dataflow to TRUE.
This way, validation will wait until the dataflow starts running. By that time, the table is created by the Execute SQL Task and there will be no problem.


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
ashutosh152
ashutosh152
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 29
Thanks Koen (da-zero) & pmm.sudarsan for sharing suggestions.

Actually i found another way which solved my problem. I made use of sequence containers and grouped logical related tasks together. The containers were placed in the sequence i wanted the flow to go and it worked.
pmm.sudarsan
pmm.sudarsan
Grasshopper
Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)Grasshopper (20 reputation)

Group: General Forum Members
Points: 20 Visits: 105
Gr8 let me try this
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