0

I have a long-running C# code that needs to run when a row inserted in the SQL Server Table.

I have tried "Service Broker" to trigger a store procedure, but it can't help me completely because there are required to create a excel file and some more complex logic.

How can I setup Microsoft SQL Server Management Studio 2016 to execute my code.

Thanks!

vibhav bhavsar
  • 187
  • 4
  • 16
  • SQL Server Management 2016 is just a tool for you to use when managing SQL Server. It's not meant to become part of an application. What are you planning to have it do? – mason Apr 20 '20 at 13:32
  • 2
    This is just a duplicate of your previous question. You need a system design/architecture that works with SQL Server and supports your requirements - and that isn't something that can be easily answered in a Q&A forum like this. And you need to seriously review why a single row insertion (or multiple row insertion) should attempt to execute your "application". – SMor Apr 20 '20 at 13:32
  • You can [monitor the database](https://stackoverflow.com/questions/5288434/how-to-monitor-sql-server-table-changes-by-using-c) then trigger your code from there. – gpro Apr 20 '20 at 13:33
  • @SMor, I'm using external service which performs some task and adds an entry to the table to notify us and now I need to create a trigger that performs long-running task based on the value we got from them (as I understand SQL Trigger is not preferable in this case, I had created Service Broker). So I need to create such a service that can call my C# code when a row inserted in the SQL Table. – vibhav bhavsar Apr 20 '20 at 15:42

0 Answers0