Eclipse
Eclipse

Reputation: 45493

Interprocess communication from SQL Server Project

I'm trying to create a SQL Server CLR user-defined function that connects to a 3rd-party service (hosted on the same server as the SQL Server instance). Is there a way to get WCF named pipes or TCP to work in this situation? Is there a better way to do this, if I provide an intermediary service?

Upvotes: 2

Views: 2314

Answers (1)

Remus Rusanu
Remus Rusanu

Reputation: 294247

Don't implement IPC in SQLCLR. The SQL server hosted CLR uses SQL threading primitives and you'll end up starving the SQL worker threads and schedulers.

Do all your IPC from a process outside SQL Server. If you need to communicate with this process from SQL jobs (from stored procedures and triggers) use in-database queuing, either by Tables as Queues or by Service Broker.

Upvotes: 4

Related Questions