Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

I downloaded the Precints shapefile from the City of Boston's data hub, and I'm trying import it into SQLServer (I'm running the Express verson). I've already created the database in the SQLServer (but not the tables), so now I'm using OGR to import the data. I keep getting this error:"FAILURE: Unable to open datasource 'precints.shp' with the following drivers."

Here's what I've written in the OSGeo4W command prompt:

ogr2ogr –f “MSSQLSpatial” “MSSQL:server=Comp1\SQLExpress;database=Precints-ogr2ogr; trusted_connection=yes” “Precincts.shp”

I've tried downloading the data again, but no luck. I tried getting rid of the XML file that has the same name as the .shp file, but it still didn't work. Any idea on how to fix this?

Thanks for your help!

share|improve this question
do you have the rest of the shapefile? You'll need (at least) Precincts.dbf and Precincts.shx ( – iant Nov 5 '12 at 8:43

Your Answer


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

Browse other questions tagged or ask your own question.