15

I know this is a total noob question but then again, when it comes to PostgreSQL I am a total noob...

I have installed the OpenGeo suite on my computer, running Windows 7, 64-bit. I have downloaded the tutorial data and have been working through it. I would like to access the database that I have made with ArcGIS so I can start learning about how that works. However, when I try to connect to the database using the "Add Database Connection..." I can't seem to figure out what to put in for 'Instance' - everything I've tried (localhost, localhost,54321, my IP address with and without the port, my computer name) doesn't seem to work.

I installed and created the nyc test database according to all the instructions in the OpenGeo tutorial pages but am at a total loss here. I know this must be an easy thing to deal with, I just can't get my head around it. Can someone with more experience throw me a bone on this one? enter image description here enter image description here

Frustratingly enough, QGIS connects to the database with almost no effort and everything works fine - but my organization is heavily ESRI focused and switching to QGIS is a long shot...

EDIT Thanks everyone for pitching in on this. I really appreciate the advice, it's what makes this site great. I have installed

  • OpenGeo Suite 3.0.1 with no extensions
  • ArcGIS Desktop 10.1, no license for server

I just went to the Opengeo website and downloaded the Windows installer and installed the default configuration. I have tried every permutation for the instance name that I can think of - using colons and commas, my machine name, localhost, postgresql, server, my IP address, random curse words, anything I can think of. I have been using port 54321 instead of 5432 because that is what the OpenGeo workshop told me to set up my 'nyc' practice database to use.

It seems that localhost should work, here is a shot of the server properties from pgAdmin: enter image description here

4
  • did you install the postgis stack from opengeo suite? try postgresql:localhost
    – Brad Nesom
    Commented Feb 7, 2013 at 21:42
  • Brad - Thanks for the quick response, yes, I installed the whole opengeo suite. I added a screenshot of what I have in pgAdmin.
    – Kevin
    Commented Feb 7, 2013 at 21:48
  • 2
    5432 is the default port: so locally with localhost:5432 will work
    – Mapperz
    Commented Feb 7, 2013 at 22:44
  • if the the connection is distant this solution could help stackoverflow.com/a/11171874/749063
    – geogeek
    Commented Nov 7, 2013 at 9:43

4 Answers 4

10

The problem here was that I had not installed the client files, so I couldn't connect to the database.

Rookie mistake through and through.

I copied libeay32.dll, libiconv-2.dll, libintl-8.dll, libpq.dll, and ssleay32.dll from the PostgreSQL folder and put it into the ArcGIS10.1 \Bin\ folder. Then it would connect up just like it should.

Thanks for all the help on this!

1
  • 2
    There's also an installer for these files on the ESRI customer portal.
    – DPierce
    Commented May 30, 2013 at 16:21
6

If you're using ArcGis 10.1: Download the postgrsql-9.0.5 from here http://www.filehorse.com/download-postgresql-64/10965/ It has a windows installer, unlike most of the other sites I found. This is the 32-bit version which is required by ArcGIS 10.1.

Open ArcCatalog: Add Database Connection. Select PostgreSQL from the datbase platform drop down. Instance is: localhost, 5432 (notice the comma. Colons don't work!!) username: postgres password: postgres

You should now be able to use the database drop down to select your db.

1
  • Yes i validated this but why? Could any one help.
    – Learner
    Commented Sep 6, 2015 at 18:05
3

you mention you tried localhost;54321

it should be colon

localhost:54321

I have this working on Windows using ArcGIS 10.1

What version are you using?

2
  • 2
    Comma worked for me with 10.3.1
    – mlt
    Commented Nov 16, 2016 at 4:28
  • thanks @mlt. I had to use comma , with Pro 2.7 also. Colon : did not work. Commented Apr 22, 2021 at 22:52
-1

For the instance use the name of the machine the PostgreSQL db is installed on. I don't use the port number there. The user name and password must in the Login Roles on the db. Double check your use of admin.

2
  • Okay, I changed the instance name to my machine name, that got rid of the 'Failed to Start' potion of the error I was getting. Now it reads: "Unable to connect to database server to retrieve database list; please verify your server name, user name and password info and try again." I've also made sure that the login name/password are in the Logon Roles, although I'm not sure I did that correctly. Still no dice though. As I've tried to find a solution to this elsewhere I'm seeing 'direct connection' come up a lot - is it relevant that I do not have a license of ArcServer?
    – Kevin
    Commented Feb 7, 2013 at 22:19
  • It might be. I'm using a PostgreSQL back-end that is registered with the ArcGIS Server for my connection. Commented Feb 8, 2013 at 0:01

Your Answer

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

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