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?
asked Sep 25, 2012 at 7:29
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"
answered Sep 25, 2012 at 7:48
-
I've tried that (so many times) but it failed (with the administrative dataset from that link).Pure.Krome– Pure.Krome2012年09月25日 07:49:10 +00:00Commented Sep 25, 2012 at 7:49
-
1
-
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– Pure.Krome2012年09月25日 09:10:49 +00:00Commented 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.– R.K.2012年09月25日 09:14:15 +00:00Commented Sep 25, 2012 at 9:14
lang-sql