<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi Francesco,</p>
<p>on Ubuntu 18.04 to use MSSQl layers I've to installa these
packages:</p>
<p>tdsodbc</p>
<p>libqt5sql5-tds</p>
<p>I think they have same name on Debian.</p>
<p>Bye <br>
</p>
<p>W<br>
</p>
<div class="moz-cite-prefix">Il 03/07/20 10:08, Francesco D Alesio
ha scritto:<br>
</div>
<blockquote type="cite"
cite="mid:kcEE.4v43gfy2Q4qJ1MnEZ8z0rQ.gF2DKBFR1gE@groupware.dc.ies.it">
<meta name="Generator" content="Kopano WebApp v3.5.14.2539+111.1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>QGIS Server on Debian - MSSqlServer layer</title>
<!-- begin sanitized html -->
<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>
<!-- end sanitized html -->
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Qgis-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></pre>
</blockquote>
<div class="moz-signature">-- <br>
<p style="font-size:12px;">
Walter Lorenzetti phD<br>
email: <a class="moz-txt-link-abbreviated" href="mailto:lorenzetti@gis3w.it">lorenzetti@gis3w.it</a><br>
skype: aiki74<br>
twitter:<a href="https://twitter.com/w_lorenzetti">w_lorenzetti</a><br>
g+:<a href="https://plus.google.com/117055903318462447104/">aiki74</a><br>
Tel/Cell: (+39) 347-6597931<br>
Viale Verdi 24 - 51016 Montecatini Terme (PT)
<br>
<a
href="http://gis3w.it/it/calendario-corsi-software-geografici">Nuovi
corsi QGIS e GFOSS</a>
</p>
</div>
</body>
</html>