New answers tagged

2

The direct cause of the "The context transaction which was active before entering user defined routine, trigger or aggregate "..." has been ended inside of it, which is not allowed." error is: You are calling the XML_SCHEMA_NAMESPACE() built-in function, and sometimes it fails due to not finding the specified XML Schema Collection. As per the info in the ...


6

Can I host the DLL on a different server so it will get run there? How would this work? If you want to run code on a remote server, you would still need code on the local server to be able to make that remote call. Although, you could set up an instance of Express Edition to host the SQLCLR code (it would need to be a Stored Procedure(s) and/or ...


1

To my knowledge, there's no practical way of running CLR code (in the database) on a different machine than the SQL Server itself. Given your requirements, I would recommend an alternative similar to the Windows service solution. Polling a table regularly may not be very good from a performance perspective. Rather, could you use CLR code in your trigger to ...


1

Short answer, no. Possible alternative for you are to make the trigger/clr fire off an asynchronous web service call that is hosted on another server. This would allow your process to be executed on another server and have minimal impact on the SQL Server.


0

The type of error that you are getting (i.e. Collection was modified;) is most likely caused by sharing the collection across multiple threads. If the variable holding the collection is defined as static, then that variable is not thread-safe since all sessions share the same App Domain for all Assemblies in a particular Database that are owned by the same ...



Top 50 recent answers are included