Wednesday, April 2, 2014

PostgreSQL Libraries for ARCGIS Server (Register Database with ArcGIS server)

PostgreSQL Libraries for ARCGIS Server (Register Database with ArcGIS server)


What correct Libraries to use ??
Well there are four type of client libraries
  1. pg_client_windows64
  2. pg_client_windows86
  3. pg_client_linux64
  4. pg_client_linux86
  1. pg_client_windows64
    This include client files required to make connection from 64 bit windows platform client to PostgreSQL
    libeay32.dll, libintl.dll, libpq.dll, and ssleay32.dl
  2. pg_client_windows86
    This include client files required to make connection from 32 bit windows platform client to PostgreSQL
     libeay32.dll, libiconv-2.dll, libintl-8.dll, libpq.dll, and ssleay32.dll
  3. pg_client_linux64
    This include client files required to make connection from 64 bit linux platform client to PostgreSQL
     libpq.so, libpq.so.5, and libpq.so.5.3.
  4. pg_client_linux32
    This include client files required to make connection from 32 bit linux platform client to PostgreSQL

Required libraries need to be copied to 
C:\Program Files\ArcGIS\Server\bin  

Register Database to ArcGIS server

Register Database to ArcGIS server


While publishing data (from database) to ArcGIS server it gives you a warning that

24011: Data source is not registered with the server and data will be copied to the server

How to resolve this ??
Well there are different approaches, here is the one which i followed. But before doing anything Please Note:
Note: The client side libraries need to be copied to ArcGIS server's bin folder. What does this mean ??
Well you have to copy the libraries (obtained from esri's customer portal Or simply google it "PostgreSQLClientLibs922" Or PostgreSQL libraries for ArcGIS server)
Copy the correct version of libraries to
C:\Program Files\ArcGIS\Server\bin   

Note to see the correct version of libraries click here.

Now,
  • Open ArcGIS server Manager from (prefer Internet Explorer)http://localhost:6080/arcgis/manager/site.html
  • Sign in to your ArcGIS server account
  • On home Page under Directories tab click on Data Store
  • Click on Registered Database


  • Type Name, and click on Import. It'll ask you "The System/PublishingTools service is currently stopped. Click Start Service to start it now and continue with registering a Data Store". Click on start service
  • It'll then ask you "Select the connection file (.sde or .odc file) you want to import."
  • Browse to Select the connection.sde file. 
  • Where you can find .sde file ??
  • Open Arc Catalog and then right click your database connection file and click on properties under DATA BASE CONNECTIONS in Arc Catalog tree.
  • There you will find the path of your connection file.

  • Now using this path browse to select the connection .sde file for both the Publisher Database connection and server database connection (Mostly its the same)

Upon successful import you'll see this 

Click on Validate All and the question mark will be removed.