[GIS] Importing Shapefile geometry into SQL Server 2016

shapefilesql server

What is the most preferred way to import shapefile geometry into MS SQL Server 2016?

Best Answer

Adding to klewis's answer: I got shape2sql.exe to work by adding a Shape2Sql.exe.config file with the following contents:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.SqlServer.Types" publicKeyToken="89845dcd8080cc91" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-14.0.0.0" newVersion="14.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

You can change the 14.0.0.0 to whichever version of Microsoft.SqlServer.Types is applicable to your version of SQL Server.