3

I've been asked to integrate SQL transaction data with a video monitoring system in real-time. The video system's application is only capable of receiving data by listening on a serial port or a specific IP address and port.

Is it possible to write/send data from SQL to a serial port or IP? How?

The transaction data is stored in a Microsoft SQL Server 2005 database.

I can't find anything around this on Google or this site. Every search returns how to pick up data from serial and write to SQL dbs, not the other way around.

I may be going around this the wrong way - any related relevant ideas are welcomed.

  • Which RDBMS are you using? What platform (Linux/Windows)? – Philᵀᴹ Aug 3 '12 at 4:00
  • MSFT SQL Server 2005, Windows. If it's possible on any system, I would bet there's a way to make it work on this. – matadur Aug 3 '12 at 4:07
  • You should write an inbetween program where you take the information from the SQL server, format it the way you desire, then send it where you want. – Soulzityr Aug 3 '12 at 6:43
3

No SQL Server will not be able to write directly to a serial port or TCP socket. You'll need to either write an application that pulls the data from the SQL Server, or a SQL CLR procedure that calls out to the TCP IP address and socket.

I'd recommend using an app to query the SQL Server database then write that data to the serial port or TCP socket.

  • 2
    The requirements are kind of unclear, but it sounds like he wants a push from the database side. +1 for SQL CLR. – Jon Seigel Aug 3 '12 at 13:07
  • If I was building this I'd probably use service broker and the external activator to launch the application. Clr would be an option, but probably not my first choice. – mrdenny Aug 4 '12 at 0:40
  • Thanks @mrdenny. Writing a separate process (while doable) is not an option for this scenario. CLR is a good idea. – matadur Aug 7 '12 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.