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 ««12

SSIS Package Inside Trigger keeps running endlessly Expand / Collapse
Author
Message
Posted Thursday, October 18, 2012 6:57 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Sunday, August 24, 2014 5:44 AM
Points: 1,125, Visits: 1,589
Eugene Elutin (10/18/2012)
Did your "above you" insisted that you should use trigger to execute XP_CMDSHELL? Or they just told you that SSIS should start as soon as records inserted?
I would not definitely, under any circumstances, call xp_cmdsheel from a trigger - just NEVER.
You may try to create scheduled task and use msdb.dbo.sp_start_job to start it from the trigger, that may be a bit better...
Also you can use Service Broker.


Hi Eugene,

The "above me" above me asked me to call the SSIS package from a Trigger without making the package a part of a job. So I was pretty much left with Xp_cmdshell. Any other suggestions of doing it are very welcome. Thanks for ur time.


Vinu Vijayan

For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden
Post #1374313
Posted Thursday, October 18, 2012 7:01 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Friday, June 27, 2014 12:43 PM
Points: 15,444, Visits: 9,596
vinu512 (10/18/2012)
Eugene Elutin (10/18/2012)
Did your "above you" insisted that you should use trigger to execute XP_CMDSHELL? Or they just told you that SSIS should start as soon as records inserted?
I would not definitely, under any circumstances, call xp_cmdsheel from a trigger - just NEVER.
You may try to create scheduled task and use msdb.dbo.sp_start_job to start it from the trigger, that may be a bit better...
Also you can use Service Broker.


Hi Eugene,

The "above me" above me asked me to call the SSIS package from a Trigger without making the package a part of a job. So I was pretty much left with Xp_cmdshell. Any other suggestions of doing it are very welcome. Thanks for ur time.


You could do a CLR trigger, if the server/database allows that. It's an option, but I don't know that it's actually any better.


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #1374315
Posted Friday, October 19, 2012 3:12 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Sunday, August 24, 2014 5:44 AM
Points: 1,125, Visits: 1,589
I really don't know a lot about CLR. And I think if I start now then it would be really time consuming. So, I'd rather stick to solving this problem the way it is for right now. I'll give CLR Triggers some time after I'm finished with the task at hand.

So, please guys.....any other suggestions of how I could get this to work??


Vinu Vijayan

For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden
Post #1374698
Posted Wednesday, October 24, 2012 7:22 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Friday, June 27, 2014 12:43 PM
Points: 15,444, Visits: 9,596
vinu512 (10/19/2012)
I really don't know a lot about CLR. And I think if I start now then it would be really time consuming. So, I'd rather stick to solving this problem the way it is for right now. I'll give CLR Triggers some time after I'm finished with the task at hand.

So, please guys.....any other suggestions of how I could get this to work??


Add logging to the SSIS package. See where it gets to, or if it even starts, when fired from the trigger. When you find that out, you'll have a better idea of what needs to be fixed/modified.


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #1376458
Posted Thursday, October 25, 2012 10:17 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Sunday, August 24, 2014 5:44 AM
Points: 1,125, Visits: 1,589
Thanks GSquared......I'll add logging and trace the package. I'll get back to you on this one after I'm done with it.

Vinu Vijayan

For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden
Post #1377384
Posted Friday, October 26, 2012 9:21 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 12:26 AM
Points: 2,840, Visits: 3,963
vinu512 (10/19/2012)

So, please guys.....any other suggestions of how I could get this to work??
for the time begin you can test the SSIS package manually . see if it get blocking only by trigger call or not ? additionally i will say if you can make the ssis's stuff asynchrous then try to use service broker. SSIS call within the trigger will be cumbersome sooner or later you need to change this approach


-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #1377674
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse