<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=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<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:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Aptos",sans-serif;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:11.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">I’ve spent a fair amount of time trying to track down an ODBC connection issue after upgrading to Mapserver 8.2.2<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Platform:<o:p></o:p></p>
<p class="MsoNormal">Windows Server 2016<o:p></o:p></p>
<p class="MsoNormal">IIS<o:p></o:p></p>
<p class="MsoNormal">MS SQL Server 2016<o:p></o:p></p>
<p class="MsoNormal">Mapserver 8.2.2 (binaries from GISInternals)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Creating an ODBC connection using the MS administrator works, and the connection test is successful.<o:p></o:p></p>
<p class="MsoNormal">The DSN is a System DSN using the ODBC Driver 17 for SQL Server<o:p></o:p></p>
<p class="MsoNormal">The user account for the connection is confirmed to have access to the SQL View being used for a VRT layer using OGR<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Testing with OGRINFO on the following .ovf file:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><OGRVRTDataSource><o:p></o:p></p>
<p class="MsoNormal"> <OGRVRTLayer name='CABINsite'><o:p></o:p></p>
<p class="MsoNormal"> <SrcDataSource>ODBC:****/***** @Cabinservice,qryWMSInternal</SrcDataSource><o:p></o:p></p>
<p class="MsoNormal"> <SrcSQL>SELECT * FROM qryWMSInternal WHERE sitedetailsid = ****</SrcSQL><o:p></o:p></p>
<p class="MsoNormal"> <FID>sitedetailsid</FID><o:p></o:p></p>
<p class="MsoNormal"> <GeometryType>wkbPoint</GeometryType><o:p></o:p></p>
<p class="MsoNormal"> <LayerSRS>WGS84</LayerSRS><o:p></o:p></p>
<p class="MsoNormal"> <GeometryField encoding='PointFromColumns' x='longitude' y='latitude'/><o:p></o:p></p>
<p class="MsoNormal"> </OGRVRTLayer><o:p></o:p></p>
<p class="MsoNormal"></OGRVRTDataSource><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Generates the error “Failed to open datasource ‘ODBC:****/****…..”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The same test in my production environment, using Mapserver 7.x, connects to the VRT layer and reports as expected.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Anyone have something else I can look for? I’ve seen a number of posts in various forums with similar issues, but they all seem to resolve with an error in the connection string. Since I’m sure the format/credentials is correct, I’m not
sure where else to look. Is there a change in how OGR/GDAL operates in the 8.2.2 binaries I have (security changes?) that would result in this issue?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Tim<span lang="EN-CA" style="font-family:"Calibri",sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>