Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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 '13 at 15:41
Your question isn't clear - are you having problems finding the servers? Accessing and or interfacing with the MS SQL DBs? – GlenH7 Sep 24 '13 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,,, etc. My Google searches were "Python MSSQL" and "Ruby MSSQL". – Robert Harvey Sep 24 '13 at 15:42
@GlenH7 accessing/interfacing – drewwyatt Sep 24 '13 at 15:44
This question appears to be off-topic because it is about implementation, not a conceptual programming topic. – Robert Harvey Sep 24 '13 at 15:45
up vote 3 down vote accepted

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.

share|improve this answer
This is the simplest way? Or are you suggesting it because it's the latest and greatest? – Robert Harvey Sep 24 '13 at 18:39
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. – Michael Brown Sep 24 '13 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 '13 at 21:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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