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?

1 Answer 1


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

  • I've tried that (so many times) but it failed (with the administrative dataset from that link).
    – Pure.Krome
    Commented Sep 25, 2012 at 7:49
  • 1
    Which error did you get?
    – R.K.
    Commented Sep 25, 2012 at 7: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
    Commented Sep 25, 2012 at 9: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.
    Commented Sep 25, 2012 at 9:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.