<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Time new Roman";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.E-MailFormatvorlage18
        {mso-style-type:personal;
        font-family:"Tahoma",sans-serif;
        color:windowtext;}
span.E-MailFormatvorlage20
        {mso-style-type:personal-reply;
        font-family:"Tahoma",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif">Hello all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif">it seems that nobody has an idea. I’ve found some tips (some of them really old) to install the latest ODBC-Driver from Microsoft or the SQL Server Native Client. First is installed,
 second is not supported in SQL Server 2019. Another tip was to rename or delete ogr_MSSPATIAL.dll but this dll isn’t installed on my system (obviously not part of the QGIS installation package).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif">So, it looks as if ogr2ogr is not really helpful for me and I have to look for another tool.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif">Best regard<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif">Michael<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:DE">Von:</span></b><span style="mso-fareast-language:DE"> Qgis-user <qgis-user-bounces@lists.osgeo.org>
<b>Im Auftrag von </b>Reetz, Michael (NLPV) via Qgis-user<br>
<b>Gesendet:</b> Mittwoch, 19. Oktober 2022 12:50<br>
<b>An:</b> qgis-user@lists.osgeo.org<br>
<b>Betreff:</b> [Qgis-user] ogr2ogr doesn't connect to MS SQL Server<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:solid #003333 1.0pt;padding:2.0pt 2.0pt 2.0pt 2.0pt">
<p style="line-height:10.0pt;background:#D5EAFF"><span style="font-size:10.0pt;font-family:"Time new Roman",serif;color:red">ACHTUNG!!</span><span style="font-size:10.0pt;font-family:"Time new Roman",serif"> Diese E-Mail erreicht Sie von einem Absender außerhalb
 der niedersächsischen Landesverwaltungs-Infrastruktur mit TLS-Verschlüsselung. Bitte klicken Sie auf keine Links oder öffnen Sie keine E-Mail-Anhänge, falls Sie den Absender nicht kennen und nicht wissen, ob der Inhalt sicher ist.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif">Dear QGIS users,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif">we are using MS SQL Server 2019 as basis for Geoserver and GIS software. There are a lot of tables that have attributes of the types geometry and/or geography. I can load these
 tables into QGIS (3.22.8) projects without any problems.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif">Now I’m asked to add an geography attribute to one table that has already an geometry attribute and populate it with coordinates by transforming the geometry values. I’ve found
 code how to do this with ogr2ogr but when I run it I receive the error message “Unable to open datasource ‘MSSQL:server=<my server IP>;database=<my database>;trusted_connection=yes;' with the following drivers”. MSSQLSpatial is not listed but should be part
 of the ODBC driver. Any idea? Which driver QGIS is using?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Tahoma",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;mso-fareast-language:DE">Michael<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;mso-fareast-language:DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;mso-fareast-language:DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Tahoma",sans-serif;mso-fareast-language:DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;mso-fareast-language:DE">*****************************************
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;mso-fareast-language:DE">Michael Reetz<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;mso-fareast-language:DE">Datenbanken und Anwendungsentwicklung<br>
Nationalpark-Verwaltung Niedersächsisches Wattenmeer <br>
Virchowstr. 1 | 26382 Wilhelmshaven <br>
Tel.: +49 (0) 4421 911 291 <br>
e-mail: <a href="mailto:michael.reetz@nlpv-wattenmeer.niedersachsen.de"><span style="color:blue">michael.reetz@nlpvw.niedersachsen.de</span></a>
<br>
Web: <a href="https://www./"><span style="color:blue">https://www.</span></a><u><span style="color:blue">nationalpark-wattenmeer.de</span></u>
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:DE"><img border="0" width="219" height="118" style="width:2.2812in;height:1.2291in" id="Grafik_x0020_1" src="cid:image001.png@01D8E46E.DFA7EF10"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>