Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Get Data from Trigger to External Application

Author  Topic 

CodeMonkey42
Starting Member

1 Post

Posted - 2011-01-27 : 12:27:54
I apologize if this has been answered in another thread but I didn't find anything similar during my search.

I have a trigger that processes incoming data from a table and when certain types of data are inserted, the trigger needs to get the data to an external application for further processing. I am trying to avoid the application having to constantly poll the database to find new data to process. Ideally the trigger would be able to pass the data directly to the application, but if I could simply notify the application, say with a windows event, then the application could look up the results of the trigger from a temporary table.

I have seen mention of using the xp_cmdshell or TSQL using the SQL Agent to generate temporary jobs to perform such tasks, but since both the extended stored procedure and the SQL Agent are disabled by default, and have security concerns related to enabling them, I am trying to find another way to do this. I should also mention I do not have direct control of the database since it is a customer's database and therefor whether either feature will be available is up to the security decisions of the customer, so I can't simply enable either feature to suit my needs.

Are there any other ways to do this? Any ideas or suggestions (ideally with examples) would be appreciated.

Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-01-27 : 12:44:47
i would suggest a good way to implement this is by means of sql agent job. whenever changes happens, let it update a control table with bit flag to indicate the presence of new data. The SQL agent job which executes periodically looks into this table and upon finding the status flag set let it populate required data for application into the temporary table. upon completion of job it again resets the flag back to 0. this will again get set only when next set changes happen to main table.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -