Connecting to PostgreSQL to publish to a spatial data server
To connect to PostgreSQL from ArcGIS for Desktop to create a map and publish data to a spatial data server, you must place the PostgreSQL client files in your ArcGIS for Desktop bin directory, ensure your database is accepting connections, and create a connection 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.
Follow these steps to get the files you need and make a connection to the PostgreSQL database from ArcGIS for Desktop:
- Download the pg_client_windows86 libraries from the Esri Customer Care Portal.
- Transfer the client files to the bin directory of ArcGIS for Desktop.Note:
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.
- 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.
- If you revoked CONNECT privileges from Public in the database, you must grant CONNECT privileges on the database to the user you want to use for your database connection.
- Start ArcCatalog or start ArcMap and open the Catalog window.
- Expand the Database Connection node and double-click Add Database Connection.
- Choose PostgreSQL from the Database Platform drop-down list.
- Type the name of the server where PostgreSQL is installed in the Instance text box.
- Type the name of the PostgreSQL database in the Database text box.
- Use database authentication to connect, and type the user name and password of the connecting user in the appropriate text boxes.
Be sure to leave Save user name and password checked.
- Click OK to make the connection.
A new database connection is listed under the Database Connections node.