Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

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"


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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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