Using Esri ArcGIS Pro and Esri ArcGIS Enterprise with EDB Postgres Advanced Server

Suggest edits

Create File Geodatabase

Esri has created a new format for storing data with the geodatabase. If you’re creating or saving data, it is recommended to use this format instead of shapefiles. Data stored in a geodatabase will take up less space and perform faster than shapefiles.

The following steps take you through adding a geodatabase to Esri ArcGIS Pro and creating an Enterprise Geodatabase from that data, using the sample HongKong database. You can substitute or create your own database in place of this.

  1. Go to the HongKong GDB, or another downloaded geodatabase, as instructed in the Download GIS Database steps, and click Download.

  2. Locate and unzip HongKong.gdb.zip file that was downloaded.

    HongKong.gdb contents

    Inside the zip file is a geodatabase file: HongKong.gdb. Inside the geodatabase there are a lot of files with mysterious names. These are for functionalities in the geodatabase, do not do anything with them.

  3. Return to ArcGIS Pro and select New then select Map from the options under New Project, name your project and specify where it will be stored and click OK.

    EsriCreateNewProject

  4. In the Catalog pane, on the Project tab, right-click Databases and choose Add Database.

    EsriAddDatabase

    Adding geodatabase data

    You can add the geodatabase data the same way you would add a shapefile (with the Add Data button), or you can also add it with Add Database options in ArcGIS.

  5. Browse to and select HongKong.gbd, click OK.

    EsriAddGDBFile

  6. In the Catalog pane expand the Databases folder.

    EsriCatalogPane

    Default.gdb

    There will be a few geodatabases listed. If Default.gdb is present, it was created automatically when you created the project. It is empty now, but any new data that you create in this project will land here by default.

  7. Add the HongKong.gbd geodatabase to the map by selecting the arrow next to it, and right-clicking each item and selecting Add to New then select Map.

    EsriAddGDBtoMap

  8. Expand the HongKong.gbd database to view the data.

    EsriExpandGDBInformation

Create Database Connection

To create a database connection, follow the steps below.

  1. Connect to the database by right-clicking the Databases folder in the Catalog pane, and click New Database Connection. The Database Connection dialog box appears.

  2. Provide the information necessary to connect to your new database as an EDB Postgres Advanced Server superuser. Since you will use this connection file in a geoprocessing tool, you must check Save username and password. After the tool is run, you should either uncheck this option in the connection file, connect as a different user, or delete the connection file to prevent other users with access to this file from logging in to the geodatabase as a database administrator.

  3. Click OK to create the connection.

    A new connection file is created with Database Connection and will appear under Databases in the Contents pane.

    EsriNewDatabaseConnection

    PostGIS files are added with a successful connection.

    EsriNewPostGISConnection

Create Enterprise Geodatabase

Enterprise Geodatabases create geodatabase system tables, stored procedures, functions, and types in an existing database, which enable geodatabase functionality in the database.

The Create Enterprise Geodatabase tool creates a database, storage locations, and a database user to be used as the geodatabase administrator and owner of the geodatabase depending on the database management system (DBMS) used. It grants the geodatabase administrator privileges required to create a geodatabase, and then creates a geodatabase in the database.

  1. Open Analysis then open Tools.

    EsriAnalysisTools

  2. Open ToolBox then select the following nested options: Data Management Tools, then select Geodatabase Administration, and finally select Create Enterprise Geodatabase.

  3. Enter the connection information for your EDB Postgres Advanced Server instance by providing the platform, in this case PostgreSQL, the Instance connection information and the Database information used to create the connection.

  4. Select the Keycodes Authorization file created in the Enable Enterprise Geodatabase section.

  5. Select PostGIS under Spatial Type.

  6. Click on Run.

    EsriCreateEnterpriseGeodatabaseRun

    When the run is completed and successful, you will see a green box displaying the message Create Enterprise Geodatabase completed., from there you can click View Details to read more information.

    EsriCreateEnterpriseGeodatabaseSuccessfulRun

  7. The Schema will be created on your EDB Postgres Advanced Server Instance with its geodatabase objects.

    Note

    If you hover your mouse over your Database Connection in the Catalog pane it will display the message "Enterprise Connection" to easily keep track of your Enterprise Geodatabases within your project.

    EsriEnterpriseConnectionMessage

    The following code demonstrates the sde schema that is created after the Enterprise Geodatabase has been created in Esri ArcGIS Pro:

    C:\Program Files\edb\as14\bin>
    C:\Program Files\edb\as14\bin>psql.exe -p 5444 -d postgis -U gisadmin
    psql (14.4.0)
    WARNING: Console code page (437) differs from Windows code page (1252)
             8-bit characters might not work correctly. See psql reference
             page "Notes for Windows users" for details.
    Type "help" for help.
    
    postgis=# \dn
          List of schemas
       Name    |    Owner
    ------------+--------------
    gisadmin   | gisadmin
    public     | enterprisedb
    sde        | sde
    tiger      | gisadmin
    tiger_data | gisadmin
    topology   | gisadmin
    (6 rows)
    
    postgis=#
    postgis=# \dt
                      List of relations
    Schema |            Name            | Type  |  Owner
    --------+----------------------------+-------+----------
    public | roads                      | table | gisadmin
    public | sde_spatial_references     | table | sde
    public | spatial_ref_sys            | table | gisadmin
    public | us_gaz                     | table | gisadmin
    public | us_lex                     | table | gisadmin
    public | us_rules                   | table | gisadmin
    sde    | gdb_conflicts              | table | sde
    sde    | gdb_itemrelationships      | table | sde
    sde    | gdb_itemrelationshiptypes  | table | sde
    sde    | gdb_items                  | table | sde
    sde    | gdb_itemtypes              | table | sde
    sde    | gdb_locks                  | table | sde
    sde    | gdb_replicalog             | table | sde
    sde    | gdb_tables_last_modified   | table | sde
    sde    | i10                        | table | sde
    sde    | i11                        | table | sde
    sde    | i6                         | table | sde
    sde    | i7                         | table | sde
    sde    | i8                         | table | sde
    sde    | i9                         | table | sde
    sde    | sde_archives               | table | sde
    sde    | sde_branch_tables_modified | table | sde
    sde    | sde_branches               | table | sde
    sde    | sde_column_registry        | table | sde
    sde    | sde_coordinate_systems     | table | sde
    sde    | sde_dbtune                 | table | sde
    sde    | sde_layer_locks            | table | sde
    sde    | sde_layer_stats            | table | sde
    sde    | sde_layers                 | table | sde
    sde    | sde_lineages_modified      | table | sde
    sde    | sde_locators               | table | sde
    sde    | sde_logfile_pool           | table | sde
    sde    | sde_metadata               | table | sde
    sde    | sde_multibranch_tables     | table | sde
    sde    | sde_mvtables_modified      | table | sde
    sde    | sde_object_ids             | table | sde
    sde    | sde_object_locks           | table | sde
    sde    | sde_process_information    | table | sde
    sde    | sde_raster_columns         | table | sde
    sde    | sde_server_config          | table | sde
    sde    | sde_state_lineages         | table | sde
    sde    | sde_state_locks            | table | sde
    sde    | sde_states                 | table | sde
    sde    | sde_table_locks            | table | sde
    sde    | sde_table_registry         | table | sde
    sde    | sde_tables_last_edit_time  | table | sde
    sde    | sde_tables_modified        | table | sde
    sde    | sde_version                | table | sde
    sde    | sde_versions               | table | sde
    sde    | sde_xml_columns            | table | sde
    sde    | sde_xml_index_tags         | table | sde
    sde    | sde_xml_indexes            | table | sde
    tiger  | addr                       | table | gisadmin
    tiger  | addrfeat                   | table | gisadmin
    tiger  | bg                         | table | gisadmin
    tiger  | county                     | table | gisadmin
    tiger  | county_lookup              | table | gisadmin
    tiger  | countysub_lookup           | table | gisadmin
    tiger  | cousub                     | table | gisadmin
    tiger  | direction_lookup           | table | gisadmin
    tiger  | edges                      | table | gisadmin
    tiger  | faces                      | table | gisadmin
    tiger  | featnames                  | table | gisadmin
    tiger  | geocode_settings           | table | gisadmin
    tiger  | geocode_settings_default   | table | gisadmin
    tiger  | loader_lookuptables        | table | gisadmin
    tiger  | loader_platform            | table | gisadmin
    tiger  | loader_variables           | table | gisadmin
    tiger  | pagc_gaz                   | table | gisadmin
    tiger  | pagc_lex                   | table | gisadmin
    tiger  | pagc_rules                 | table | gisadmin
    tiger  | place                      | table | gisadmin
    tiger  | place_lookup               | table | gisadmin
    tiger  | secondary_unit_lookup      | table | gisadmin
    tiger  | state                      | table | gisadmin
    tiger  | state_lookup               | table | gisadmin
    tiger  | street_type_lookup         | table | gisadmin
    tiger  | tabblock                   | table | gisadmin
    tiger  | tabblock20                 | table | gisadmin
    tiger  | tract                      | table | gisadmin
    tiger  | zcta5                      | table | gisadmin
    tiger  | zip_lookup                 | table | gisadmin
    tiger  | zip_lookup_all             | table | gisadmin
    tiger  | zip_lookup_base            | table | gisadmin
    tiger  | zip_state                  | table | gisadmin
    tiger  | zip_state_loc              | table | gisadmin
    (86 rows)
    
    postgis=#
    postgis=#

Move Geodatabase Data to EDB Postgres Advanced Server using An Enterprise Geodatabase

  1. Right click on the Database Connection and select Import then Feature Class.

    EsriImportFeatureClass

  2. Select the tables from the File Geodatabase as the Input Feature and select your Enterprise Geodatabase as the Output Database.

    EsriSelectTableForImport

  3. Click on Run, when the process is successful you will receive a green box with the message, Feature Class to Geodatabase completed.

    EsriFeatureClasstoGeodatabaseNew

  4. Navigate to the PostGIS database in your EDB Postgres Advanced Server instance to see the tables with data that was moved from Esri ArcGIS Pro, in this instance the HongKong tables were successfully imported.

    postgis=#
    postgis=# \dn
          List of schemas
       Name    |    Owner
    ------------+--------------
    gisadmin   | gisadmin
    public     | enterprisedb
    sde        | sde
    tiger      | gisadmin
    tiger_data | gisadmin
    topology   | gisadmin
    (6 rows)
    
    postgis=# \dt
                         List of relations
    Schema  |             Name             | Type  |  Owner
    ----------+------------------------------+-------+----------
    gisadmin | hongkong_projectedpopulation | table | gisadmin
    gisadmin | hongkong_roads               | table | gisadmin
    gisadmin | i13                          | table | gisadmin
    gisadmin | i14                          | table | gisadmin
    public   | roads                        | table | gisadmin
    public   | sde_spatial_references       | table | sde
    public   | spatial_ref_sys              | table | gisadmin
    public   | us_gaz                       | table | gisadmin
    public   | us_lex                       | table | gisadmin
    public   | us_rules                     | table | gisadmin
    sde      | gdb_conflicts                | table | sde
    sde      | gdb_itemrelationships        | table | sde
    sde      | gdb_itemrelationshiptypes    | table | sde
    sde      | gdb_items                    | table | sde
    sde      | gdb_itemtypes                | table | sde
    sde      | gdb_locks                    | table | sde
    sde      | gdb_replicalog               | table | sde
    sde      | gdb_tables_last_modified     | table | sde
    sde      | i10                          | table | sde
    sde      | i11                          | table | sde
    sde      | i6                           | table | sde
    sde      | i7                           | table | sde
    sde      | i8                           | table | sde
    sde      | i9                           | table | sde
    sde      | sde_archives                 | table | sde
    sde      | sde_branch_tables_modified   | table | sde
    sde      | sde_branches                 | table | sde
    sde      | sde_column_registry          | table | sde
    sde      | sde_coordinate_systems       | table | sde
    sde      | sde_dbtune                   | table | sde
    sde      | sde_layer_locks              | table | sde
    sde      | sde_layer_stats              | table | sde
    sde      | sde_layers                   | table | sde
    sde      | sde_lineages_modified        | table | sde
    sde      | sde_locators                 | table | sde
    sde      | sde_logfile_pool             | table | sde
    sde      | sde_metadata                 | table | sde
    sde      | sde_multibranch_tables       | table | sde
    sde      | sde_mvtables_modified        | table | sde
    sde      | sde_object_ids               | table | sde
    sde      | sde_object_locks             | table | sde
    sde      | sde_process_information      | table | sde
    sde      | sde_raster_columns           | table | sde
    sde      | sde_server_config            | table | sde
    sde      | sde_state_lineages           | table | sde
    sde      | sde_state_locks              | table | sde
    sde      | sde_states                   | table | sde
    sde      | sde_table_locks              | table | sde
    sde      | sde_table_registry           | table | sde
    sde      | sde_tables_last_edit_time    | table | sde
    sde      | sde_tables_modified          | table | sde
    sde      | sde_version                  | table | sde
    sde      | sde_versions                 | table | sde
    sde      | sde_xml_columns              | table | sde
    sde      | sde_xml_index_tags           | table | sde
    sde      | sde_xml_indexes              | table | sde
    tiger    | addr                         | table | gisadmin
    tiger    | addrfeat                     | table | gisadmin
    tiger    | bg                           | table | gisadmin
    tiger    | county                       | table | gisadmin
    tiger    | county_lookup                | table | gisadmin
    tiger    | countysub_lookup             | table | gisadmin
    tiger    | cousub                       | table | gisadmin
    tiger    | direction_lookup             | table | gisadmin
    tiger    | edges                        | table | gisadmin
    tiger    | faces                        | table | gisadmin
    tiger    | featnames                    | table | gisadmin
    tiger    | geocode_settings             | table | gisadmin
    tiger    | geocode_settings_default     | table | gisadmin
    tiger    | loader_lookuptables          | table | gisadmin
    tiger    | loader_platform              | table | gisadmin
    tiger    | loader_variables             | table | gisadmin
    tiger    | pagc_gaz                     | table | gisadmin
    tiger    | pagc_lex                     | table | gisadmin
    tiger    | pagc_rules                   | table | gisadmin
    tiger    | place                        | table | gisadmin
    tiger    | place_lookup                 | table | gisadmin
    tiger    | secondary_unit_lookup        | table | gisadmin
    tiger    | state                        | table | gisadmin
    tiger    | state_lookup                 | table | gisadmin
    tiger    | street_type_lookup           | table | gisadmin
    tiger    | tabblock                     | table | gisadmin
    tiger    | tabblock20                   | table | gisadmin
    tiger    | tract                        | table | gisadmin
    tiger    | zcta5                        | table | gisadmin
    tiger    | zip_lookup                   | table | gisadmin
    tiger    | zip_lookup_all               | table | gisadmin
    tiger    | zip_lookup_base              | table | gisadmin
    tiger    | zip_state                    | table | gisadmin
    tiger    | zip_state_loc                | table | gisadmin
    (90 rows)
    
    postgis=#
    
  5. Verify the table structure in your EDB Postgres Advanced Server instance with the Esri Table Structure.

    postgis=#
    postgis=# desc gisadmin.hongkong_projectedpopulation
                         Table "gisadmin.hongkong_projectedpopulation"
                Column              |          Type          | Collation | Nullable | Default
    ---------------------------------+------------------------+-----------+----------+---------
    objectid                        | integer                |           | not null |
    tcname                          | character varying(30)  |           |          |
    ename                           | character varying(30)  |           |          |
    y2014                           | integer                |           |          |
    y2015                           | integer                |           |          |
    y2016                           | integer                |           |          |
    y2017                           | integer                |           |          |
    y2018                           | integer                |           |          |
    y2019                           | integer                |           |          |
    y2020                           | integer                |           |          |
    y2021                           | integer                |           |          |
    y2022                           | integer                |           |          |
    y2023                           | integer                |           |          |
    y2024                           | integer                |           |          |
    net_change                      | integer                |           |          |
    change_percentage               | numeric(38,8)          |           |          |
    average_annual_change_percentag | numeric(38,8)          |           |          |
    populationtrend                 | character varying(255) |           |          |
    gdb_geomattr_data               | bytea                  |           |          |
    shape                           | geometry               |           |          |
    Indexes:
       "a3_ix1" gist (shape)
       "r14_sde_rowid_uk" UNIQUE, btree (objectid) WITH (fillfactor='75')
    Check constraints:
       "enforce_srid_shape" CHECK (st_srid(shape) = 3857)
    
    postgis=#
    
    postgis=#
    postgis=# desc gisadmin.hongkong_roads
                         Table "gisadmin.hongkong_roads"
          Column       |          Type          | Collation | Nullable | Default
    -------------------+------------------------+-----------+----------+---------
    objectid          | integer                |           | not null |
    iso_cc            | character varying(4)   |           |          |
    name1             | character varying(254) |           |          |
    name2             | character varying(254) |           |          |
    name3             | character varying(254) |           |          |
    name4             | character varying(254) |           |          |
    name5             | character varying(254) |           |          |
    shield            | character varying(50)  |           |          |
    type              | character varying(20)  |           |          |
    rank              | integer                |           |          |
    rd_feature        | character varying(10)  |           |          |
    gdb_geomattr_data | bytea                  |           |          |
    shape             | geometry               |           |          |
    Indexes:
       "a2_ix1" gist (shape)
       "r13_sde_rowid_uk" UNIQUE, btree (objectid) WITH (fillfactor='75')
    Check constraints:
       "enforce_srid_shape" CHECK (st_srid(shape) = 4326)
    postgis=#
    
  6. Verify that the correct data is loaded in the imported Tables in EDB Postgres Advanced Server from Esri ArcGIS Pro using PgAdmin and/or PEM.

    The following images display the data that was imported into the EDB Postgres Advanced Server instance from Esri ArcGIS Pro in PgAdmin to visualize table structure and maps.

    EsriPgAdminProjectedPopulationTable

    EsriPgAdminRoadsTable

    EsriPgAdminProjectedPopulationMap

  7. Alternately, display the imported data in ArcGIS Pro on your Esri ArcGIS Map and table, and confirm that it is correct in Esri ArcGIS Pro.

  8. Click on your Database Connection, and select the required table and click on Map/Geography or Table to explore the data.

    EsriImportedDataFromServer

    EsriImportedDataInMapViewArcGISProCheck

    EsriImportedDataArcGISProCheckSecondMap

  9. Test any changes in data that you may make in EDB Postgres Advanced Server with Esri ArcGIS Pro. Execute the following commands to change the data in EDB Postgres Advanced Server.

    Changing some data in the EDB Postgres Advanced Server instance:

    postgis=#
    postgis=# update gisadmin.hongkong_roads SET name1='test1', name2='test2' where objectid=1;
    UPDATE 1
    postgis=#
    postgis=# select name1,name2 from gisadmin.hongkong_roads where objectid=1;
    name1 | name2
    -------+-------
    test1 | test2
    (1 row)
    

    Checking the data in Esri ArcGis Pro to ensure that the test changes are visible:

    EsriArcGISProDataChangeTest

    Performing a few more data alterations, deleting some data and inserting new data to test the connections:

    postgis=#
    postgis=#
    postgis=# delete from gisadmin.hongkong_roads where objectid=1;
    DELETE 1
    postgis=# select name1,name2 from gisadmin.hongkong_roads where objectid=1;
    name1 | name2
    -------+-------
    (0 rows)
    
    postgis=#
    postgis=# insert into gisadmin.hongkong_roads values (76,NULL,'test1','test2','test3','test4','test5',8,'Major Road',1,NULL,NULL,NULL);
    INSERT 0 1
    postgis=#
    postgis=#
    postgis=# select name1,name2 from gisadmin.hongkong_roads where objectid=76;
    name1 | name2
    -------+-------
    test1 | test2
    (1 row)
    
    postgis=#
    

    Displaying the new changes to the data in Esri ArcGIS Pro:

    EsriArcGISProDataChangeTest2

  10. Click on the Database Connection and select the changed table, then click on Map/Geography or Table to confirm the changes are made within Esri ArcGIS Pro from your EDB Postgres Advanced Server database.

Sharing/Publishing a Map from ArcGIS Pro to Enterprise Server

This guide shares a use case in which a map was shared from Esri ArcGIS Pro to an Esri ArcGIS Enterprise Environment. The steps below discuss sharing maps that have been created in Esri ArcGIS Pro and how they can then be viewed in the Esri Portal that is part of an Esri ArcGIS Enterprise Environment.

  1. Right click on the table you want to share, in this case postgis.gisadmin.HongKong.Roads, and click Add to Maps, select the newly added map.

  2. Click the Share option in the top menu pane.

  3. In the Share As group, click Web Map.

    EsriShareWebMap

  4. Accept the default name or provide a new name for the web map.

  5. Select a configuration for your web map, Copy all data: Editable was selected for this use case.

  6. Optionally, click the Folder drop-down arrow and choose or create a folder in your portal content to store the web map.

  7. Specify how the web map will be shared, ArcGIS Enterprise is the choice if you are sharing to your Enterprise configuration.

  8. The Use symbol types compatible with all clients option is checked by default, you can uncheck it if you need.

The following image displays all of the Web Map options that were checked before selecting Finish Sharing.

EsriEnterpriseShareAsWebMap

  1. Under Finish Sharing, click Analyze to review for any potential problems. In order to share a map successfully to an Esri ArcGIS Enterprise configuration you must resolve all errors that appear, you do not have to resolve warnings in order to share.

  2. After you have resolved errors, and optionally resolved warnings, click Share to share the web map.

  3. Once the web map has been successfully shared, click the Manage web map link at the bottom of the pane to manage the web map in your portal.

    EsriEnterpriseFinishSharing

  4. Click the map and select Open in Map Viewer Classic.

    EsriArcGISEnterpriseMapShare

    The shared map of the HongKong Roads Table.

    EsriEnterpriseRoadsViewinSharedContent

    The shared map of the HongKong Population Table.

    EsriEnterprisePopulationViewinSharedContent

  5. Click Save to save the Map in your portal.

  6. Optionally, click Open in Map Viewer to check the contents in the map.

  7. Go to your Portal and then navigate to the Contents section and saved Maps and data that was shared are there.

You can click on each map individually in the Contents pane of your Portal to see its details.

EsriSharedMapPortalOptions


Could this page be better? Report a problem or suggest an addition!