[gdal-dev] Connecting to MSSQL from linux using OGR?
Jeff McKenna
jmckenna at gatewaygeomatics.com
Tue Jul 2 03:51:52 PDT 2019
Years ago I used FreeTDS library, but today the recommended way to
connect is through the Microsoft ODBC library
(https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-20170).
There was a recent discussion here on your same topic
http://osgeo-org.1560.x6.nabble.com/gdal-dev-connect-mssql-from-linux-td5363547.html
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/
On 2019-07-01 10:54 PM, Wardrop wrote:
> Hi All,
>
> I'm trying to connect a MSSQL database using ogrinfo and ogr2ogr, but am not
> having any success. Most of the examples I see online assume you're
> connecting from a Windows. I'm trying to connect from OpenSUSE. Here's what
> I've been trying:
>
> ogrinfo
> "MSSQL:server=sql12.msc.local\MSSQLSERVER;database=GIS;UID=sa;PWD=<blanked>;"
>
> That results in:
>
> FAILURE:
> Unable to open datasource
> `MSSQL:server=sql12.msc.local\MSSQLSERVER;database=GIS;UID=sa;PWD=<blanked>;'
> with the following drivers.
> -> JP2ECW
> -> OCI
> -> SOSI
> -> ...
>
> I've tried specifying various "drivers" by appending for example
> ";driver=FreeTDS". The error is always the same, and returns instantly. It's
> like the connection string isn't even making it to the MSSQLSpatial OGR
> driver. Is this even meant to work on linux? I'm at a complete loss.
>
>
More information about the gdal-dev
mailing list