I am trying to import a very large sqlite file into Postgres SQL 9.3.

The first tool I tried to use was OGR2GUI (http://www.ogr2gui.ca/). The 64 Bit version does nothing, whilst the 32 bit version says

  • unable to open ogr2ogr !

I have tried running org2ogr from the command line too, I have tried:

ogr2ogr --config SQLITE_LIST_ALL_TABLES YES -f "PostgreSQL" PG:"dbname='mydatabaseName' active_schema=myschema schemas=public host='localhost' port='myportnumber' user='myusername' password='mypassword' " -overwrite -lco SCHEMA=myschema -lco GEOMETRY_NAME=geometry -lco SPATIAL_INDEX=YES myfilename.sqlite  myfilename

ogr2ogr -f "PostgreSQL" PG:"dbname=mydatabaseName" myfilename.sqlite myfilename

ogr2ogr -f PostgreSQL PG:"host=localhost user=myusername password=mypassword dbname=mydatabaseName" -lco LAUNDER="YES" myfilename.sqlite -skipfailures

And various iterations on these, each time I get:

Unable to open datasource'myfilename.sqlite' with the following drivers
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> SDTS
  -> TIGER
  -> S57
  -> DGN
  -> VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> GML
  -> GPX
  -> KML
  -> GeoJSON
  -> GMT
  -> WAsP
  -> PostgreSQL
  -> OpenFileGDB
  -> XPlane
  -> AVCBin
  -> AVCE00
  -> DXF
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> PGDump
  -> GPSBabel
  -> SUA
  -> OpenAir
  -> PDS
  -> HTF
  -> AeronavFAA
 -> SVG
 -> Idrisi
 -> SEGY
 -> PDF
 -> SXF

Of course sqlite is not on this list, but how can I add it?

I have tried running osgeo set-up, but there is no option I can find to add it.

  • 1
    i suppose that you are using Windows. In that case you can use the binaries from gisinternals.com/sdk. They are compiled with SQLite and Spatialite.
    – user30184
    Jul 27, 2015 at 14:20
  • Thanks, I am having a look, but I have not added binaries before, is there a guide anywhere for adding new binaries to OGR2OGR?
    – Mart
    Jul 28, 2015 at 10:18
  • Ogr2ogr is a compiled binary itself and the gisinternals binaries include ogr2ogr. Use them as ís and you should be fine. With OSGeo4W setup sqlite and spatialite libraries are selected from the "lib" part of advanced setup.
    – user30184
    Jul 29, 2015 at 20:08

1 Answer 1


The Issue was resolved with a fresh installation of OSGeo

Your Answer

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

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