I work for a company whose point-of-sale service uses IIS servers tied to static IP addresses at each of our stores. My boss wants a better real-time stat tracker than what the point-of-sale service provides.

I would like to connect to these servers from a central location and retrieve the data. If possible, I'd like to be able to do so from Python, PHP, or Ruby. What are some recommended approaches for doing so.

  • First, find the driver for the language of your choice. Thats really the first step for any database connection. Beyond that, its just another relational database.
    – user40980
    Sep 24, 2013 at 15:41
  • 2
    Your question isn't clear - are you having problems finding the servers? Accessing and or interfacing with the MS SQL DBs?
    – user53019
    Sep 24, 2013 at 15:42
  • The methods for accessing MSSQL should be very similar to the other databases; you just have to establish a connection first. There are libraries that will help you do that; see code.google.com/p/pymssql, code.google.com/p/pyodbc, github.com/rails-sqlserver/tiny_tds, etc. My Google searches were "Python MSSQL" and "Ruby MSSQL". Sep 24, 2013 at 15:42
  • @GlenH7 accessing/interfacing
    – drewwyatt
    Sep 24, 2013 at 15:44
  • 4
    This question appears to be off-topic because it is about implementation, not a conceptual programming topic. Sep 24, 2013 at 15:45

1 Answer 1


The simplest way to expose a MS SQL Database to a remote client is to use WCF Data Services. Using Visual Studio, you can walk through a wizard that looks at the database and creates the service for you in minutes.

WCF Data Services exposes your data using an open protocol called OData. There is a consumer library for Ruby that will consume an OData service and allow you to do whatever you want with it.

  • This is the simplest way? Or are you suggesting it because it's the latest and greatest? Sep 24, 2013 at 18:39
  • 1
    It's the most straight forward in that it involves the least amount of custom coding. You literally have a service up and running in minutes. Sep 24, 2013 at 21:10
  • @MikeBrown This sounds very cool. I was able to get pyodbc to work, but if I I can use this with Ruby instead I think I would prefer that. I'll look into it for sure. Thanks!
    – drewwyatt
    Sep 24, 2013 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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