Setting up a connection to PostgreSQL

 

Setting up a connection to PostgreSQL

Geodata » Administering geodatabases » Geodatabases in PostgreSQL
PostgreSQL client libraries are required on the client computer from which you will connect to the database.
You can download the PostgreSQL client files from the Esri Customer Care portal and place them in the bin directory of your ArcGIS client application to allow you to connect directly to a PostgreSQL database.
There are four possible client library downloads:

  • pg_client_linux86: Includes the RPM client files required to make a connection from a 32-bit client running on a Red Hat Linux operating system to a PostgreSQL database.
  • pg_client_windows86: Includes the client files required to make a connection from a 32-bit client on a Windows operating system to a PostgreSQL database. Files are libeay32.dll, libiconv-2.dll, libintl-8.dll, libpq.dll, and ssleay32.dll.
  • pg_client_linux64: Includes the RPM client files required to make a connection from a 64-bit client running on a Red Hat Linux operating system to a PostgreSQL database. Libraries are libpq.so, libpq.so.5, and libpq.so.5.3.
  • pg_client_windows64: Includes the client files required to make a connection from a 64-bit client running on a Windows operating system to a PostgreSQL database. The files are libeay32.dll, libintl.dll, libpq.dll, and ssleay32.dll.

To use a client on SUSE Linux, you need to install the PostgreSQL SUSE client. If your PostgreSQL database is installed on SUSE, you can copy or use FTP to move the client libraries from your PostgreSQL lib directory to your ArcGIS client bin directory. If your PostgreSQL database is installed on a different operating system, obtain the SUSE PostgreSQL client files from PGFoundry or a similar site.
To use the client libraries available on the Esri Customer Care portal, do the following:

Steps:

  1. Download the PostgreSQL client libraries from the Esri Customer Care Portal.
  2. Be sure to download the correct libraries for your ArcGIS client. For ArcGIS for Desktop and ArcGIS Engine, you need the 32-bit libraries. For ArcGIS for Server, you need the 64-bit client libraries.
  3. Be sure your ArcGIS client application is closed.
  4. Transfer the client files to the bin directory of your ArcGIS client installation.

Note:

  1. Be sure to place all the files in the bin directory. Specific versions of these files are required to connect to the database; even if you already have a different version of one of the files on your system, you still need the version of the file that you downloaded from the Esri Customer Care portal to be present in the client bin directory.

  2. If you placed the client RPMs on a Linux server, run the RPMs.
  3. Alter the PostgreSQL pg_hba.conf file on the database server to accept client connections. See the PostgreSQL documentation for information on altering the pg_hba.conf file.
  4. Restart PostgreSQL or force the postmaster to reload the pg_hba.conf file by running pg_ctl reload.
  5. Be sure users have privileges to connect to the database cluster.
  6. By default, Public has CONNECT privileges to the PostgreSQL database cluster; therefore, you only need to grant CONNECT to individual users if you revoked the CONNECT privilege from Public.
Advertisements

About berrymanchris

I recently graduated from University of Wisconsin - Whitewater and I work as a Senior Analyst at PANGEA Studios at the University in Whitewater, WI.

Posted on August 10, 2012, in Blog. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s