[gdal-dev] MSSQL Driver on Mac (Andreas Oxenstierna)

William Kyngesburye woklist at kyngchaos.com
Wed Feb 13 16:52:20 PST 2019


This is a tricky driver.  It uses ODBC (iODBC on macOS).  You need an ODBC driver for the MSSQL database for the Mac's iODBC.  GDAL doesn't know about installed ODBC drivers until you try to use them, so ogrinfo --formats will say MSSQL is supported.

I don't know if any ODBC drivers are available on macOS for MSSQL.

> On Feb 13, 2019, at 2:39 PM, Horn, Ian I (COT) <Ian.Horn at ky.gov> wrote:
> 
> Andreas, here’s what I get when:
> 
> 
> Ians-iMac:~ ianhorn$ ogrinfo --formats | grep MS
>   MSSQLSpatial -vector- (rw+): Microsoft SQL Server Spatial Database
>   XLS -vector- (ro): MS Excel format
>   XLSX -vector- (rw+v): MS Office Open XML spreadsheet
> 
> 
> 
> 
>> 
> 
>> On Feb 13, 2019, at 3:00 PM, gdal-dev-request at lists.osgeo.org <mailto:gdal-dev-request at lists.osgeo.org> wrote:
>> 
>> Send gdal-dev mailing list submissions to
>> gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>> 
>> To subscribe or unsubscribe via the World Wide Web, visit
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>> or, via email, send a message with subject or body 'help' to
>> gdal-dev-request at lists.osgeo.org
>> 
>> You can reach the person managing the list at
>> gdal-dev-owner at lists.osgeo.org
>> 
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of gdal-dev digest..."
>> 
>> 
>> Today's Topics:
>> 
>>   1. Re: MSSQL Driver on Mac (Peter Petrik)
>>   2. Re: MSSQL Driver on Mac (Andreas Oxenstierna)
>> 
>> 
>> ----------------------------------------------------------------------
>> 
>> Message: 1
>> Date: Wed, 13 Feb 2019 15:26:06 +0100
>> From: Peter Petrik <peter.petrik at lutraconsulting.co.uk>
>> To: "Horn, Ian I (COT)" <Ian.Horn at ky.gov>
>> Cc: "gdal-dev at lists.osgeo.org" <gdal-dev at lists.osgeo.org>
>> Subject: Re: [gdal-dev] MSSQL Driver on Mac
>> Message-ID:
>> <CA+T_MsJpeSiwaDwCtm3zqRnMt_8ftRO_KJ4urje0kgA0uw5nYw at mail.gmail.com>
>> Content-Type: text/plain; charset="utf-8"
>> 
>> Hi, which installation do you use?
>> 
>> Cheers,
>> Peter
>> 
>> On Wed, Feb 13, 2019 at 3:14 PM Horn, Ian I (COT) <Ian.Horn at ky.gov> wrote:
>> 
>>> I am trying to access a SQL Server on QGIS, but I get the “error opening
>>> connection:  Driver not loaded Driver not loaded”.  QGIS installs GDAL
>>> 2.3.2.  On my PC I know how to get to the root folders and check to see if
>>> the driver is there but not on my Mac.  If I use my terminal I get the
>>> following:
>>> 
>>> Unable to open datasource
>>> `mssql:server=XXXXXXXXX;database=XXXX;tables=XXXXX.TrafficCameras;XXXXXX;
>>> ' with the following drivers.
>>> 
>>> How do I install or make this driver work on my Mac for both command line
>>> and use in QGIS?
>>> 
>>> Thanks,
>>> 
>>> Ian
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190213/a0a61fdb/attachment-0001.html>
>> 
>> ------------------------------
>> 
>> Message: 2
>> Date: Wed, 13 Feb 2019 15:27:54 +0100
>> From: Andreas Oxenstierna <ao at t-kartor.se>
>> To: gdal-dev at lists.osgeo.org
>> Subject: Re: [gdal-dev] MSSQL Driver on Mac
>> Message-ID: <0a58531e-caab-7ce7-f0de-d1fd58917530 at t-kartor.se>
>> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>> 
>> What is ogrinfo reporting?
>> ogrinfo --formats | grep MS
>> 
>> For me (macOS 10.14.2 GDAL 2.3.2) it reports:
>> MSSQLSpatial -vector- (rw+): Microsoft SQL Server Spatial Database
>> 
>>> I am trying to access a SQL Server on QGIS, but I get the “error 
>>> opening connection:  Driver not loaded Driver not loaded”.  QGIS 
>>> installs GDAL 2.3.2.  On my PC I know how to get to the root folders 
>>> and check to see if the driver is there but not on my Mac.  If I use 
>>> my terminal I get the following:
>>> 
>>> Unable to open datasource 
>>> `mssql:server=XXXXXXXXX;database=XXXX;tables=XXXXX.TrafficCameras;XXXXXX;
>>> ' with the following drivers.
>>> 
>>> How do I install or make this driver work on my Mac for both command 
>>> line  and use in QGIS?
>>> 
>>> Thanks,
>>> 
>>> Ian
>>> 
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>> 
>> 
>> -- 
>> Hälsningar
>> 
>> Andreas Oxenstierna
>> T-Kartor Geospatial AB
>> Olof Mohlins väg 12 Kristianstad
>> mobile: +46 733 206831
>> mailto: ao at t-kartor.se
>> http://www.t-kartor.com
>> 
>> -------------- next part --------------
>> An HTML attachment was scrubbed...
>> URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190213/0fbf5c3a/attachment-0001.html>
>> 
>> ------------------------------
>> 
>> Subject: Digest Footer
>> 
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>> 
>> ------------------------------
>> 
>> End of gdal-dev Digest, Vol 177, Issue 19
>> *****************************************
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

The equator is so long, it could encircle the earth completely once.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20190213/3ead0d51/attachment-0001.html>


More information about the gdal-dev mailing list