[GIS] Error when creating enterprise geodatabase

arcgis-10.2arcgis-desktoparcgis-serveresri-geodatabasepostgresql

I'm trying to create an enterprise geodatabase. My problem is when I try to create a corporate geodatabase. The error is:

Cannot connect to database because the database client software failed
to load. Be sure the database client software is installed and
configured Correctly. Failed to execute (CreateEnterpriseGeodatabase).

Here is what I have tried so far.

I have installed on my server:

  • Windows Server 2012 R2 64-bit
  • ArcGIS for Server 10.2.2
  • ArcGIS Desktop 10.2.2
  • PostgreSQL 9.2.2

I have also downloaded the following client libraries:

  • PostgreSQL 9.2.2 64-bit
  • iconv.dll libeay32.dll libintl-8.dll libpq.dll ssleay32.dll

I have pasted these libraries into the following folders on my server:

  • C: \ Program Files \ ArcGIS \ Server \ bin
  • C: \ Program Files (x86) \ ArcGIS \ Desktop10.2 \ bin

I have also pasted the ST_Geometry libraries in the lib directory of PostgreSQL and have edited the text file, pg_hba file.

Best Answer

I think the set of PostgreSQL drivers you downloaded are incomplete, and here's why:

ArcGIS Server was installed as an x64 (bit) app, while the ArcGIS 10.2 Desktop client is an x86 (32-bit) app. So, referencing this ESRI documentation means the 64-bit postgreSQL libraries (libeay32.dll, libintl.dll, libpq.dll, and ssleay32.dll) go into the Server install/bin folder and the 32-bit libraries (libeay32.dll, libiconv-2.dll, libintl-8.dll, libpq.dll, and ssleay32.dll) go into the Desktop Client install/bin folder.

Next, of course was the edit on the pg_hba.conf file and a PostgreSQL restart <-- lets make sure to correctly re-start the database AFTER the dll libraries are refreshed.

Checking for correct database privs would be my next check if the above steps do not repair the problem.

It reads like you were moving through this ESRI Tutorial, but if not, I strongly encourage/recommend it.

Good Luck.