<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)">
<!--[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:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;}
/* 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.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Arial",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:963779216;
        mso-list-type:hybrid;
        mso-list-template-ids:1167615832 -906357016 201916419 201916421 201916417 201916419 201916421 201916417 201916419 201916421;}
@list l0:level1
        {mso-level-start-at:5;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Arial",sans-serif;
        mso-fareast-font-family:Calibri;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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-AU" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I’ve have an ogr2ogr script (attached) that creates a kml from a sql database. This works fine, but if I run the batch file from SQL Server using xp_cmdshell I get the following
 message twice<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><i><span style="font-size:10.0pt;font-family:"Arial",sans-serif">ERROR 1: Can't load requested DLL: \\gissrv.ad.mps\data\ogr2ogr\gdalplugins\ogr_MSSQLSpatial.dll<o:p></o:p></span></i></b></p>
<p class="MsoNormal"><b><i><span style="font-size:10.0pt;font-family:"Arial",sans-serif">126: The specified module could not be found.<o:p></o:p></span></i></b></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">The kml is created but without the geometries and smaller file size.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I ended up deciding on creating a scheduled task on our production server to run the batch every few hours, and the same problem occurs, the file is smaller without geometries.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I set environment path variables for GDAL, GDAL_DATA and GDAL_DRIVER but the problem remains.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">The ogr2ogr files live on our GIS server, so I also tested by copying them locally on the Production server with no luck.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I then tested the scheduled task on our development server and it runs fine. I see there are some dll’s on C:\System32 on dev that aren’t in prod, including<o:p></o:p></span></p>
<ul style="margin-top:0cm" type="disc">
<li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">SQLServerSpatial100,120,140, although 110 is on both servers.<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Msodbcsql11 – I installed the driver but no luck<o:p></o:p></span></li><li class="MsoListParagraph" style="margin-left:0cm;mso-list:l0 level1 lfo1"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">adalsql – I installed the driver but no luck<o:p></o:p></span></li></ul>
<p class="MsoListParagraph"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I am happy to go with the scheduled task on Development as I’ve spent a lot of time trying to get this working, but what would cause production to fail and why can’t I get it
 to work as SQL stored procedure?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Ideally I’d like the SQL option so the user can have the data on the fly.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN" style="mso-fareast-language:EN-AU"><o:p> </o:p></span></p>
<table class="MsoNormalTable" border="0" cellpadding="0" width="570" style="width:427.5pt">
<tbody>
<tr style="height:61.5pt">
<td style="padding:0cm 0cm 0cm 0cm;height:61.5pt">
<table class="MsoNormalTable" border="0" cellpadding="0" width="570" style="width:427.5pt">
<tbody>
<tr>
<td width="100" style="width:75.0pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU"><img width="100" height="81" style="width:1.0416in;height:.8437in" id="_x0000_i1030" src="cid:image001.gif@01D51614.8A73F5B0" alt="MPS"></span><span style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
</td>
<td width="3" style="width:2.25pt;background:#7D96B5;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU"> 
<o:p></o:p></span></p>
</td>
<td width="450" style="width:337.5pt;padding:0cm 0cm 0cm 11.25pt">
<table class="MsoNormalTable" border="0" cellpadding="0" width="450" style="width:337.5pt">
<tbody>
<tr>
<td colspan="2" style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;text-transform:uppercase;mso-fareast-language:EN-AU">JOSHUA GEOGHEGAN |</span></b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#003057;mso-fareast-language:EN-AU">
 GIS Specialist</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU">
<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td colspan="2" style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU">Email:
</span></b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU"><a href="mailto:joshua.geoghegan@mornpen.vic.gov.au"><span style="color:black;text-decoration:none">joshua.geoghegan@mornpen.vic.gov.au</span></a>
<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td colspan="2" style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU">Phone:
</span></b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU">03 5950 1321
<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td nowrap="" colspan="2" style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU">Private Bag 1000, Rosebud VIC 3939
<b>|</b> 90 Besgrove Street, Rosebud VIC 3939 <o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="150" style="width:112.5pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU">Follow us on social media!
<o:p></o:p></span></p>
</td>
<td width="300" style="width:225.0pt;padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><a href="https://www.mornpen.vic.gov.au/"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:blue;mso-fareast-language:EN-AU;text-decoration:none"><img border="0" width="20" height="20" style="width:.2083in;height:.2083in" id="_x0000_i1029" src="cid:image002.gif@01D51614.8A73F5B0" alt="mornpen.vic.gov.au"></span></a><a href="https://www.facebook.com/mornpenshire"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:blue;mso-fareast-language:EN-AU;text-decoration:none"><img border="0" width="20" height="20" style="width:.2083in;height:.2083in" id="_x0000_i1028" src="cid:image003.gif@01D51614.8A73F5B0" alt="Facebook"></span></a><a href="https://www.instagram.com/ourpeninsula/"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:blue;mso-fareast-language:EN-AU;text-decoration:none"><img border="0" width="20" height="20" style="width:.2083in;height:.2083in" id="_x0000_i1027" src="cid:image004.gif@01D51614.8A73F5B0" alt="Instagram"></span></a><a href="http://twitter.com/MornPenShire"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:blue;mso-fareast-language:EN-AU;text-decoration:none"><img border="0" width="20" height="20" style="width:.2083in;height:.2083in" id="_x0000_i1026" src="cid:image005.gif@01D51614.8A73F5B0" alt="Twitter"></span></a><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><a href="https://www.mornpen.vic.gov.au/emailcampaign"><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:blue;mso-fareast-language:EN-AU;text-decoration:none"><img border="0" width="650" height="92" style="width:6.7708in;height:.9583in" id="_x0000_i1025" src="cid:image006.jpg@01D51614.8A73F5B0" alt="Latest News"></span></a><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:15.0pt">
<td style="padding:0cm 0cm 0cm 0cm;height:15.0pt">
<div>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-AU">Mornington Peninsula Shire acknowledges and pays respect to the Boon Wurrung/Bunurong people,
<br>
the traditional custodians of these lands and waters. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#4E89BC;mso-fareast-language:EN-AU">We are committed to carbon neutrality.
<o:p></o:p></span></p>
</div>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<table border="0" cellpadding="0" style="font-family:Arial;width:600px">
<tbody>
<tr>
<td colspan="2" style="padding:0cm 0cm 0cm 0cm;">
<p style="font-size: 7.0pt;word-spacing: -1px;"><br>
 <br>
DISCLAIMER: This email (and attachments) is for the intended recipient only and may contain privileged, confidential or copyright information. If received in error, please notify sender immediately and delete. Any other use is prohibited. Shire accepts no liability
 for damage caused by this email (and attachments) due to viruses, corruption, delay, interruption, unauthorised access or use. Views expressed are those of the individual and not necessarily Shire. Shire will only collect personal information from you with
 your prior consent, use it for the purpose collected or as reasonably expected and not disclose without consent, except if required by law/regulation. For further information see our privacy policy:
<br>
<img src="https://news.mornpen.vic.gov.au/arrow.png" width="10px" height="10px" alt="Arrow">
<a href="https://www.mornpen.vic.gov.au/privacystatement" style="font-size: 7.0pt;color: black;text-decoration: none">
mornpen.vic.gov.au/privacystatement</a> </p>
<img src="https://news.mornpen.vic.gov.au/envirostatement.png" width="600" height="21" alt="Consider the Environment">
</td>
</tr>
</tbody>
</table>
</body>
</html>