<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
  <meta name="Generator" content="Kopano WebApp v3.5.14.2539+111.1">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>R: [Qgis-user] QGIS Server on Debian - MSSqlServer layer</title>
</head>
<body>
<!-- begin sanitized html --><p style="padding: 0; margin: 0; min-height: 10pt; font-family: tahoma,arial,helvetica,sans-serif; font-size: 10pt;">Chris,</p>
<p style="padding: 0; margin: 0; min-height: 10pt; font-family: tahoma,arial,helvetica,sans-serif; font-size: 10pt;"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;">thank you for the answer.<br /></span></p>
<p style="padding: 0; margin: 0; min-height: 10pt; font-family: tahoma,arial,helvetica,sans-serif; font-size: 10pt;"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"></span></p>
<p style="padding: 0; margin: 0; min-height: 10pt; font-family: tahoma,arial,helvetica,sans-serif; font-size: 10pt;"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;">Unfortunately, while ogr2ogr is working properly following those suggestions, qgis is not.</span></p>
<p style="padding: 0; margin: 0; min-height: 10pt; font-family: tahoma,arial,helvetica,sans-serif; font-size: 10pt;"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"><br /></span></p>
<p style="padding: 0; margin: 0; min-height: 10pt; font-family: tahoma,arial,helvetica,sans-serif; font-size: 10pt;"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"><br /></span></p>
<p style="padding: 0; margin: 0; min-height: 10pt; font-family: tahoma,arial,helvetica,sans-serif; font-size: 10pt;"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;">Francesco</span></p>
<p style="padding: 0; margin: 0; min-height: 10pt; font-family: tahoma,arial,helvetica,sans-serif; font-size: 10pt;"><span style="font-size: 10pt; font-family: tahoma, arial, helvetica, sans-serif;"><br /></span></p>
<p style="padding: 0; margin: 0; min-height: 10pt; font-family: tahoma,arial,helvetica,sans-serif; font-size: 10pt;"><br /></p>
<blockquote style="border-left: 2px solid #325FBA; padding-left: 5px; margin: 0px 5px;"><span style="font-family: tahoma,arial,helvetica,sans-serif; font-size: 10pt;">-----Messaggio originale-----<br /><span><strong>Da:</strong> chris hermansen <clhermansen@gmail.com></span><br /><span><strong>Inviato:</strong> Venerdì 3 Luglio 2020 16:25</span><br /><span><strong>A:</strong> Francesco D Alesio <francesco.dalesio@ies.it></span><br /><span><strong>Cc:</strong> qgis-user <qgis-user@lists.osgeo.org></span><br /><span><strong>Oggetto:</strong> Re: [Qgis-user] QGIS Server on Debian - MSSqlServer layer</span><br /><br /></span>
<div dir="auto">Francesco and list,
<div dir="auto"><br /></div>
<div dir="auto">Please look at this <a href="http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-MSSQL-driver-not-found-amp-Can-t-open-lib-SQL-Server-QGIS-2-18-LTR-on-Debian-td5386050.html" title="http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-MSSQL-driver-not-found-amp-Can-t-open-lib-SQL-Server-QGIS-2-18-LTR-on-Debian-td5386050.html
Click the link to open the URL in a new window." rel="noreferrer noopener" target="_blank">http://osgeo-org.1560.x6.nabble.com/QGIS-Developer-MSSQL-driver-not-found-amp-Can-t-open-lib-SQL-Server-QGIS-2-18-LTR-on-Debian-td5386050.html</a></div>
</div>
<br />
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Fri, Jul 3, 2020, 01:16 Francesco D Alesio <<a href="mailto:francesco.dalesio@ies.it" title="mailto:francesco.dalesio@ies.it
Click the link to open the URL in a new window." rel="noreferrer noopener" target="_blank">francesco.dalesio@ies.it</a>> wrote:<br /></div>
<blockquote class="gmail_quote" style="margin: 0 0 0 .8ex; border-left: 1px #ccc solid; padding-left: 1ex;"><u></u>
<div>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;">Hello everybody,</span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;">I'm trying to display an MS Sql Server layer with QGIS Server (3.12) installed on a Debian 10 machine.</span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><br /></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;">The project is giving the "Layer(s) not valid" error, because of the MS Sql Server layer (postgis layers are working properly).</span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><br /></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;">I've installed the odbc driver, and now I can connect to sql server with ogr2ogr, specifyng "Driver={ODBC Driver 17 for SQL Server}" in the connection string.</span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;">Than I added a [SQL Server] section to /etc/odbcinst.ini , and now ogr2ogr works without the Driver in the connection string.</span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;">But QGIS is still giving the <span style="font-size: 13.3333px;">"</span><span style="font-size: 13.3333px;">Layer(s) not valid" error.</span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;"><br /></span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;">I've also tried to add the driver name to the source attribute of the layer-tree-layer element of the qgs file, without success.</span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;"><br /></span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;">Three questions:</span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;">1. What else can I try?</span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;">2. <span style="font-size: 13.3333px;">Is there a way to get more detailed error information? apache error logs are empty, and </span><span style="font-size: 13.3333px;">QGIS_SERVER_LOG_FILE contains just the layer id (</span><span style="font-size: 13.3333px;">QGIS_SERVER_LOG_LEVEL=0 and </span><span style="font-size: 13.3333px;">QGIS_DEBUG=9)</span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;">3. Do you recommend using windows instead of debian in this environment?</span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;"><br /></span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;">Thank you</span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;"><br /></span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;">Regards</span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;"><br /></span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;"><br /></span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;">Francesco</span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;"><br /></span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><span style="font-size: 13.3333px;"><br /></span></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><br /></span></p>
<p style="padding: 0; margin: 0;"><span style="font-size: 10pt; font-family: tahoma,arial,helvetica,sans-serif;"><br /></span></p>
</div>
_______________________________________________<br /> Qgis-user mailing list<br /> <a href="mailto:Qgis-user@lists.osgeo.org" title="mailto:Qgis-user@lists.osgeo.org
Click the link to open the URL in a new window." rel="noreferrer noopener" target="_blank">Qgis-user@lists.osgeo.org</a><br /> List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" title="https://lists.osgeo.org/mailman/listinfo/qgis-user
Click the link to open the URL in a new window." rel="noreferrer noopener" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br /> Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" title="https://lists.osgeo.org/mailman/listinfo/qgis-user
Click the link to open the URL in a new window." rel="noreferrer noopener" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote>
</div>
</blockquote>
<!-- end sanitized html -->
</body>
</html>