Search This Blog

Monday, July 2, 2012

Connect to SQL Server from Linux via ODBC


unixODBC (it’s a driver manager) and  should be our choice , on top of it we should plug a driver and we can find the  MS-SQL driver from Microsoft.
More details about this one could be found here http://msdn.microsoft.com/en-us/library/hh335190(v=sql.10)
From FAQ

The first version of the driver is a 64 bit
 This release supports Red Hat Enterprise Linux 5 and Red Hat Enterprise Linux 6 connecting to SQL Server 2008, SQL Server 2008 R2, and SQL Server 2012.

So if we are ok with the above restriction  … we can go forward with this driver.
We can Download the Microsoft ODBC for Linux from http://www.microsoft.com/en-us/download/details.aspx?id=28160

you can use Existing MSDN C++ ODBC Samples for Microsoft Linux ODBC Driver as described here http://blogs.msdn.com/b/sqlblog/archive/2012/01/26/use-existing-msdn-c-odbc-samples-for-microsoft-linux-odbc-driver.aspx
enjoy 
Yaniv Tzanany

No comments: