I have QGIS 1.8.0 installed via OSGeo Installer and work on win 7. All I need is to upload the shapefile to the database via this plugin. Unfortunately I am receiving an error:

Something's wrong:
["'shp2pgsql' is not recognized as an internal or external command,\n", 'operable program or batch file.\n']

How to install and configure shp2pgsql to make this plugin work fine?


Shp2pgsql.exe should be in folder C:\Program Files (x86)\Postgresql\9.0\bin.

It might help to include the folder to the systems PATH variable (although it is not here with me).

I don't know how Qgis reacts if you updated your Postgres or Postgis version after installing Qgis.

Does the DB Manager plugin see your Postgis databases?

The plugin help gives this hint:

Note: not having PostGIS installed on your local machine or being installed in some non-standard location will render this feature unusable because of the missing shp2pgsql tool.

According to this message: http://osgeo-org.1560.n6.nabble.com/Re-Qgis-user-PostGIS-Manager-compatibility-issue-with-PostGIS-2-0-td4957715.html#a4958320 the Postgis manager plugin should be replaced by the DB manager.

Unfortunately, the option to import data is still missing. But you can drag and drop shapefiles from Qgis Browser to DB Manager plugin which will do the same.

  • I am using remote data base installed on different machine. DB Manager works OK and sees all databases. I checked also databases hosted locally and shp2pgsql.exe is located in the place you pointed. Unfortunately loading still do not work
    – Odoakr
    Nov 28 '12 at 9:06
  • A very basic workaround would be to open postgis and shapefile layers in qgis, select all objects from shapefile layer by rectangle, Edit->Copy Objects, make postgis layer editable and Edit->Insert objects from the menu bar.
    – AndreJ
    Nov 28 '12 at 9:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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