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

SSIS Package Execution Flow Problem Expand / Collapse
Author
Message
Posted Monday, January 10, 2011 9:07 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 10, 2011 2:16 AM
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.


Post #1045676
Posted Tuesday, January 11, 2011 12:54 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:43 AM
Points: 13,564, Visits: 11,375
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1045722
Posted Wednesday, February 9, 2011 4:57 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 5:57 PM
Points: 16, Visits: 54
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 (?).
Post #1060999
Posted Wednesday, February 9, 2011 5:06 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 1:43 AM
Points: 13,564, Visits: 11,375
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1061005
Posted Wednesday, February 9, 2011 9:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, February 10, 2011 2:16 AM
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.
Post #1061286
Posted Wednesday, February 9, 2011 11:01 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 5:57 PM
Points: 16, Visits: 54
Gr8 let me try this
Post #1061389
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse