|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
I need a method to initiate an external process (a Business Objecs report)
once a SQL table is updated. Do triggers provide a means to perform this? If not is there anything else SQL related that does? Triggers are not ideal for operations such as that since they operate in the
context of the transaction. It is usually better to have the trigger post a row to a table that is monitored by something that will fire off the external application. This may be a SQL Agent job or an external application that periodically polls the table for new rows. If you have SQL 2005 you can use query notifications to alert an external source upon the change of a table. -- Show quoteAndrew J. Kelly SQL MVP "Brent Stevenson" <esse***@insightbb.com> wrote in message news:ekbEyn6pGHA.4368@TK2MSFTNGP05.phx.gbl... >I need a method to initiate an external process (a Business Objecs report) >once a SQL table is updated. Do triggers provide a means to perform this? >If not is there anything else SQL related that does? > Thank you for the repsonse Andrew. It's the constant monitoring (polling)
of the table that I'm trying to avoid. Was hoping for an event driven solution. Don't have SQL 2005, only SQL 2003. Any other options? Thanks Brent Show quote "Andrew J. Kelly" <sqlmvpnooospam@shadhawk.com> wrote in message news:OBHudL7pGHA.3932@TK2MSFTNGP03.phx.gbl... > Triggers are not ideal for operations such as that since they operate in > the context of the transaction. It is usually better to have the trigger > post a row to a table that is monitored by something that will fire off > the external application. This may be a SQL Agent job or an external > application that periodically polls the table for new rows. If you have > SQL 2005 you can use query notifications to alert an external source upon > the change of a table. > > -- > Andrew J. Kelly SQL MVP > > "Brent Stevenson" <esse***@insightbb.com> wrote in message > news:ekbEyn6pGHA.4368@TK2MSFTNGP05.phx.gbl... >>I need a method to initiate an external process (a Business Objecs report) >>once a SQL table is updated. Do triggers provide a means to perform this? >>If not is there anything else SQL related that does? >> > > FYI, there is no SQL2003, it would be 2000. What's preventing you from
upgrading to 2005 if it will solve a business need? In any case one other option may be to kick off a job. I believe sp_start_job starts the job and returns immediately so the trigger should be able to finish without waiting for the job to actually finish. You may need to prepopulate a table with before you issue the start job so the job knows what to do. -- Show quoteAndrew J. Kelly SQL MVP "Brent Stevenson" <esse***@insightbb.com> wrote in message news:eRvBDZAqGHA.524@TK2MSFTNGP05.phx.gbl... > Thank you for the repsonse Andrew. It's the constant monitoring (polling) > of the table that I'm trying to avoid. Was hoping for an event driven > solution. Don't have SQL 2005, only SQL 2003. Any other options? > > Thanks Brent > > > "Andrew J. Kelly" <sqlmvpnooospam@shadhawk.com> wrote in message > news:OBHudL7pGHA.3932@TK2MSFTNGP03.phx.gbl... >> Triggers are not ideal for operations such as that since they operate in >> the context of the transaction. It is usually better to have the trigger >> post a row to a table that is monitored by something that will fire off >> the external application. This may be a SQL Agent job or an external >> application that periodically polls the table for new rows. If you have >> SQL 2005 you can use query notifications to alert an external source upon >> the change of a table. >> >> -- >> Andrew J. Kelly SQL MVP >> >> "Brent Stevenson" <esse***@insightbb.com> wrote in message >> news:ekbEyn6pGHA.4368@TK2MSFTNGP05.phx.gbl... >>>I need a method to initiate an external process (a Business Objecs >>>report) once a SQL table is updated. Do triggers provide a means to >>>perform this? If not is there anything else SQL related that does? >>> >> >> > > Thank you. sp_start_job was what I was looking for. Have a good weekend.
Brent Show quote "Andrew J. Kelly" <sqlmvpnooospam@shadhawk.com> wrote in message news:uEQdNyAqGHA.3820@TK2MSFTNGP05.phx.gbl... > FYI, there is no SQL2003, it would be 2000. What's preventing you from > upgrading to 2005 if it will solve a business need? In any case one other > option may be to kick off a job. I believe sp_start_job starts the job and > returns immediately so the trigger should be able to finish without > waiting for the job to actually finish. You may need to prepopulate a > table with before you issue the start job so the job knows what to do. > > -- > Andrew J. Kelly SQL MVP > > "Brent Stevenson" <esse***@insightbb.com> wrote in message > news:eRvBDZAqGHA.524@TK2MSFTNGP05.phx.gbl... >> Thank you for the repsonse Andrew. It's the constant monitoring >> (polling) of the table that I'm trying to avoid. Was hoping for an event >> driven solution. Don't have SQL 2005, only SQL 2003. Any other options? >> >> Thanks Brent >> >> >> "Andrew J. Kelly" <sqlmvpnooospam@shadhawk.com> wrote in message >> news:OBHudL7pGHA.3932@TK2MSFTNGP03.phx.gbl... >>> Triggers are not ideal for operations such as that since they operate in >>> the context of the transaction. It is usually better to have the trigger >>> post a row to a table that is monitored by something that will fire off >>> the external application. This may be a SQL Agent job or an external >>> application that periodically polls the table for new rows. If you have >>> SQL 2005 you can use query notifications to alert an external source >>> upon the change of a table. >>> >>> -- >>> Andrew J. Kelly SQL MVP >>> >>> "Brent Stevenson" <esse***@insightbb.com> wrote in message >>> news:ekbEyn6pGHA.4368@TK2MSFTNGP05.phx.gbl... >>>>I need a method to initiate an external process (a Business Objecs >>>>report) once a SQL table is updated. Do triggers provide a means to >>>>perform this? If not is there anything else SQL related that does? >>>> >>> >>> >> >> > > |
|||||||||||||||||||||||