<div dir="ltr"><div dir="ltr">See if this helps - <a href="https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017">https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017</a>. </div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Oct 22, 2018 at 8:25 AM Peter Marlow <<a href="mailto:Peter.Marlow@scisys.co.uk">Peter.Marlow@scisys.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-GB" link="blue" vlink="purple">
<div class="m_-9016964387489134079WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Hi,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I’m trying to import a Shapefile into an SQL Server database using ogr2ogr on Ubuntu. The command I’m running looks like:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><i><span style="font-size:10.0pt;font-family:"Arial",sans-serif">ogr2ogr -f MSSQLSpatial "MSSQL:server=localhost;database=[database-name];username=sa;password=*****;trusted_connection=yes" [path-to-shape-file]<u></u><u></u></span></i></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">It returns an error stating:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><i><span style="font-size:10.0pt;font-family:"Arial",sans-serif">ERROR 1: Unable to find driver `MSSQLSpatial'.<u></u><u></u></span></i></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Is it possible to get the driver on linux? Or use an alternative driver? I’ve had a google and can’t seem to see any workarounds.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">The docs here (<a href="https://www.gdal.org/drv_mssqlspatial.html" target="_blank">https://www.gdal.org/drv_mssqlspatial.html</a>) talk about specifying a
<b>Driver</b> parameter that could be a custom SQL Server driver, however this is in the connection string and not as a parameter for the ogr2ogr command.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Thanks,<br>
Pete</span><span> <u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="m_-9016964387489134079gfidisc.scisys.co.uk" id="m_-9016964387489134079gfidisc.scisys.co.uk"></p><a id="m_-9016964387489134079gfidisc.scisys.co.uk" title="gfidisc.scisys.co.uk" href="http://gfidisc.scisys.co.uk" class="m_-9016964387489134079gfidisc.scisys.co.uk" style="text-decoration:none!important" target="_blank"></a><u></u><h1 class="m_-9016964387489134079gfidisc.scisys.co.uk"></h1><p><span style="color:#0000ff;font-family:Tahoma;font-size:small"> </span></p>
<div align="left"><span style="color:#808080;font-family:Arial;font-size:small">SCISYS UK Limited. Registered in England and Wales No. 4373530.</span></div>
<div align="left"><span style="color:#808080;font-family:Arial;font-size:small">Registered Office: Methuen Park, Chippenham, Wiltshire SN14 0GB, UK.</span></div>
<div align="left"> </div>
<div align="left"><span class="m_-9016964387489134079400184714-12042007"><span style="color:#000000"><span style="font-size:7pt;font-family:Tahoma"><span style="font-size:xx-small"><span style="color:#008000"><span style="font-family:Arial">Before printing, <span class="m_-9016964387489134079296245114-12042007">please </span>think about the environment<span class="m_-9016964387489134079296245114-12042007">.</span></span></span></span></span></span></span></div><p class="m_-9016964387489134079gfidisc.scisys.co.uk" id="m_-9016964387489134079gfidisc.scisys.co.uk"></p><a id="m_-9016964387489134079gfidisc.scisys.co.uk" title="gfidisc.scisys.co.uk" href="http://gfidisc.scisys.co.uk" class="m_-9016964387489134079gfidisc.scisys.co.uk" style="text-decoration:none!important" target="_blank"></a><u></u><h1 class="m_-9016964387489134079gfidisc.scisys.co.uk"></h1></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div>