Problem connecting to postgis / postgre query layer - database cleint software issue?

8783
29
07-10-2012 08:06 AM
MarkVolz
Occasional Contributor III
Hello,

I am trying to connect to a query layer and I am receiving the following error "Unable to connect to database server to retrice database list; please verify your server name, user name, and password info and try again.  Cannot connect to database because the database client software failed to load.  Be sure the database client software is installed and configured correctly"

I set up the database connection using the following:
platform - PostgreSQL
Instance - localhost  (my computer name does not work either)
Authentication Type - Database
User name and password - set correctly
Database - cannot select (this is where the error appears)

I am using postgresql 9.0.5 and postgis 1.5.3.  I can connect to the database using other software.  Does anyone have any troubleshooting tips?

Thanks
0 Kudos
29 Replies
VinceAngelo
Esri Esteemed Contributor
What version of ArcSDE and ArcGIS are you using?  PostgreSQL 9.0.5 isn't supported
until ArcGIS 10.1 (with PostGIS 1.5.1).

- V
0 Kudos
MarkVolz
Occasional Contributor III
vangelo,

I am using ArcGIS 10.1.  I am not using ArcSDE.  I am trying to connect directly to a postgresql / postgis database, which I have done in a workshop using File>Add Data> Add Query Layers.
0 Kudos
VinceAngelo
Esri Esteemed Contributor
Do you have the correct client DLL installed?  32-bit clients require 32-bit libraries.

- V
0 Kudos
MarkVolz
Occasional Contributor III
vangelo,

how can I download / or verify that I am using the correct dll?  Right now I have a 32 bit server and 32 bit client.  Eventually we will move the server to 64 bit, with a mixture of 32 and 64 bit clients.  

I should also ask what is the current supported version of postgres / postgis.  Is it postgres 9.0.5 and postgis 1.5.1, or is it 9.0.x and postgis 1.5.x.  In otherwords can I install postgresql 9.0.8 and postgis 1.5.4?
0 Kudos
VinceAngelo
Esri Esteemed Contributor
The database server application wordsize doesn't matter -- only the client does.   Esri ships
client ibraries in the install media -- use them.

The supported versions are 9.0.5 / 1.5.1.  PostgreSQL has a history of making non-trivial
changes in minor patches, so it's never safe to assume .x support even if .+1 or .+2 works.

- V
0 Kudos
MarkVolz
Occasional Contributor III
where are the dlls stored on the ArcGIS 10.1 disc for the POSTGRESQL / PostGIS query layers, and where should I place them?
0 Kudos
VinceAngelo
Esri Esteemed Contributor
It's been nearly a decade since I last saw a media kit, so I have no idea what your
procedure would be. I know the files are in the download directory somewhere, but
the best way to determine where is to communicate with Customer Service.

- V
0 Kudos
stevepeedell
New Contributor
Not sure if the necessary postgres client dll's are on the install media - I don't get to see DVD's any more these days, but what is strange is that these are not automatically deployed as part of the install process. At 10.1 you DO have to manually copy the dll's to your bin directory - surely this could be an install option (ask user which db they are using, and deploy the relevant dll's)?

Anyway, the workaround is to find the dll's listed below. If you are registered properly with the ESRI customer care portal you can apparently get them there, we got them from our international distributor....

Windows 32-bit PostgreSQL 9.0.5 Client Libraries:
Libpq.dll
Libeay32.dll
Libintl-8.dll
Ssleay32.dll

Place these files in the bin folders of your Windows 32-bit Esri client application.

I will no doubt post some further examples of our adventures in PostGIS/ArcGIS integration, but for now am happy to report that with the above fix we are able to use our PostGIS tables.........
0 Kudos
VinceAngelo
Esri Esteemed Contributor
Normally, the client libraries are part of the server install, so there's no need for Esri to
distribute or install client libraries (which do increase the install footprint, after all).

The problem comes when you start mix-n-match with the application word size
(client and server) without ArcSDE to do the client middle-man.  There's a number
of ways to accomplish the net result, but copying the DLLs will serve.

- V
0 Kudos