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


SSIS task taking time but SP called is quick


SSIS task taking time but SP called is quick

Author
Message
namrata.dhanawade-1143388
namrata.dhanawade-1143388
SSC Journeyman
SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)

Group: General Forum Members
Points: 83 Visits: 205
Hi,

We have a huge process that we perform using SSIS, which is mostly just calling SP's using SQL task.

When we execute each SP on SSMS they execute in about 2-3 seconds. However, when the SQL task is executed it takes about 10-15 seconds thus increasing the total process time.

What could be the reason? Are we doing something wrong? There are about 31 Sps that get executed in all and the process time goes to around 5-6 minutes.

Please help!!
cafescott
cafescott
SSC-Enthusiastic
SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)

Group: General Forum Members
Points: 166 Visits: 733
One possible work-around is to perform all of the stored procedure calls from a single umbrella procedure; i.e.,
create procedure Call_them_all
as
exec sProc1;
exec sProc2;
...

This way you don't need to establish a new connection for each stored procedure. Once you've done so with the main one it will be used for the others.
namrata.dhanawade-1143388
namrata.dhanawade-1143388
SSC Journeyman
SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)

Group: General Forum Members
Points: 83 Visits: 205
I agree with the work around. But the question still remains and that is, whether the SQL task is taking so much time only for the connection. Or is it something else?
Evil Kraig F
Evil Kraig F
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5695 Visits: 7660
Most likely they're validating. Turn on Delay Validation.

Also, make sure you're using what's become a defacto standard for SSIS called procs:

SET NOCOUNT ON;
SET FMTONLY OFF;

WHILE 1=0
BEGIN
-- Result set for SSIS to use

SELECT
CONVERT(VARCHAR(30), NULL) AS ColumnA,
...
END

... Real code here.


- 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
Phil Parkin
Phil Parkin
SSCrazy Eights
SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)SSCrazy Eights (8.3K reputation)

Group: General Forum Members
Points: 8309 Visits: 19451
Evil Kraig F (3/13/2013)
Most likely they're validating. Turn on Delay Validation.

Also, make sure you're using what's become a defacto standard for SSIS called procs:

SET NOCOUNT ON;
SET FMTONLY OFF;

WHILE 1=0
BEGIN
-- Result set for SSIS to use

SELECT
CONVERT(VARCHAR(30), NULL) AS ColumnA,
...
END

... Real code here.


...unless you're using 2012, in which case the result set definition moves to the Execute SQL task.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Evil Kraig F
Evil Kraig F
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5695 Visits: 7660
Phil Parkin (3/14/2013)

...unless you're using 2012, in which case the result set definition moves to the Execute SQL task.


Haven't gotten my hands on 2012 yet, but does that include OLEDB Data Sources using a Proc as a source as well?


- 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
namrata.dhanawade-1143388
namrata.dhanawade-1143388
SSC Journeyman
SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)SSC Journeyman (83 reputation)

Group: General Forum Members
Points: 83 Visits: 205
This is 2008 R2.

I have used delay_validation before but FMTONLY is new. Will try and get back.

Thanks you so much for all your help.
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