4

using QGIS, i've loaded up some administrative boundary data of New Zealand. I wish to now import this vector data from QGIS into my Sql Server 2012.

Is there any way to do this with QGIS 1.8.0-Lisboa?

Pure.Krome
  • 1,793
  • 4
  • 25
  • 29

1 Answers1

3

I don't know if you can do it directly with QGIS but Shape2SQL ( free standalone tool ) can do it for you.

enter image description here

You can also import shapefiles to SQL Server using ogr2ogr. A sample command is:

ogr2ogr -overwrite -f MSSQLSpatial "MSSQL:server=.\MSSQLSERVER2008;database=spatial;trusted_connection=yes" "your_shapefile.shp"

Source: https://gis.stackexchange.com/a/29849/292

R.K.
  • 17,405
  • 3
  • 59
  • 110
  • I've tried that (so many times) but it failed (with the administrative dataset from that link). – Pure.Krome Sep 25 '12 at 07:49
  • 1
    Which error did you get? – R.K. Sep 25 '12 at 07:52
  • exe crashed. yep -> stack trace, dump, etc. I might try the ogr2ogr method. Where can i find it? (i've installed QGIS, remember). Assumption : it's included with the stock standard QGIS 1.8 windows install. – Pure.Krome Sep 25 '12 at 09:10
  • You can try adding the GDAL directory to your Windows path. Once you've done that, you can invoke the command on the command prompt (cmd.exe) – R.K. Sep 25 '12 at 09:14