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


SSIS Package Inside Trigger keeps running endlessly


SSIS Package Inside Trigger keeps running endlessly

Author
Message
vinu512
vinu512
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1687 Visits: 1625
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 ;-)
GSquared
GSquared
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23441 Visits: 9730
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
vinu512
vinu512
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1687 Visits: 1625
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 ;-)
GSquared
GSquared
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23441 Visits: 9730
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
vinu512
vinu512
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1687 Visits: 1625
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 ;-)
Bhuvnesh
Bhuvnesh
SSCertifiable
SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)SSCertifiable (5.2K reputation)

Group: General Forum Members
Points: 5240 Visits: 4076
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;-)
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