Create file geodatabase

Esri created a new format for storing data with the geodatabase. If you’re creating or saving data, we recommended using this format instead of shapefiles. Data stored in a geodatabase takes up less space and performs faster than shapefiles.

This example adds a geodatabase to Esri ArcGIS Pro and creates an enterprise geodatabase from that data, using the sample HongKong database. You can substitute a different database or create your own to use.

  1. Go to the HongKong GDB, or another downloaded geodatabase, as instructed in GIS data, and select Download.

  2. Locate and unzip the downloaded HongKong.gdb.zip file.

    HongKong.gdb contents

    Inside the zip file is a geodatabase file HongKong.gdb. Inside the geodatabase are a lot of files with unfamiliar names. These files are for functionalities in the geodatabase. Don't do anything with them.

  3. In ArcGIS Pro, under New Project, select New > Map. Name your project, specify its location, and select OK.

    EsriCreateNewProject

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

    EsriAddDatabase

    Adding geodatabase data

    You can add the geodatabase data the same way you add a shapefile, with the Add Data button. You can also add it with Add Database option in ArcGIS.

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

    EsriAddGDBFile

  6. In the Catalog pane, expand the Databases folder.

    EsriCatalogPane

    Default.gdb

    A few geodatabases are listed. If Default.gdb is present, it was created when you created the project. It's empty now, but any new data that you create in this project is saved there by default.

  7. Add the HongKong.gbd geodatabase to the map. Select the arrow next to it, right-click each item, and select Add to New > Map.

    EsriAddGDBtoMap

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

    EsriExpandGDBInformation

Create database connection

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

  2. Provide the information needed to connect to your new database as an EDB Postgres Advanced Server superuser. Since you'll use this connection file in a geoprocessing tool, you must select Save username and password. After the tool runs, either clear this option in the connection file, connect as a different user, or delete the connection file. These actions prevent other users with access to this file from logging in to the geodatabase as a database administrator.

  3. To create the connection, select OK .

    A new connection file is created with a database connection. It appears 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 use 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, and then open Tools.

    EsriAnalysisTools

  2. Open ToolBox, and then select the following nested options: Data Management Tools > Geodatabase Administration > 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 Enable environment to create an enterprise geodatabase.

  5. Under Spatial Type, select PostGIS.

  6. Select Run.

    EsriCreateEnterpriseGeodatabaseRun

    When the run is complete and successful, a green box displays the message Create Enterprise Geodatabase completed. From there, you can select View Details to read more information.

    EsriCreateEnterpriseGeodatabaseSuccessfulRun

    The schema is created on your EDB Postgres Advanced Server instance with its geodatabase objects.

    Note

    If you hover over your database connection in the Catalog pane, the message "Enterprise Connection" appears, which helps you keep track of your enterprise geodatabases in your project.

    EsriEnterpriseConnectionMessage

    This example code shows the sde schema that's created after the enterprise geodatabase was 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 the database connection and select Import > 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. Select Run. When the process is successful, a green box appears 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 or PEM.

    The following images show 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. Alternatively, display the imported data in ArcGIS Pro on your Esri ArcGIS map and table, and confirm that it's correct in Esri ArcGIS Pro.

  8. To explore the data, select your database connection, select the required table, and select Map/Geography or Table.

    EsriImportedDataFromServer

    EsriImportedDataInMapViewArcGISProCheck

    EsriImportedDataArcGISProCheckSecondMap

  9. Test any changes in data that you might make in EDB Postgres Advanced Server with Esri ArcGIS Pro. Execute the following commands to change the 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)
    

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

    EsriArcGISProDataChangeTest

    Perform 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=#
    

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

    EsriArcGISProDataChangeTest2

  10. Select the database connection and select the changed table. Then select 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

In this use case, a map was shared from Esri ArcGIS Pro to an Esri ArcGIS Enterprise environment. This example shares maps that were created in Esri ArcGIS Pro and shows how you can then view them in the Esri portal that's part of an Esri ArcGIS Enterprise environment.

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

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

  3. In the Share As group, select 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, select the folder arrow and select or create a folder in your portal content to store the web map.

  7. Specify how to share the web map. ArcGIS Enterprise is the choice if you're sharing to your Enterprise configuration.

  8. The Use symbol types compatible with all clients option is selected by default. You can clear it if you need to.

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

EsriEnterpriseShareAsWebMap

  1. Under Finish Sharing, select Analyze to review for any potential problems. To share a map successfully to an Esri ArcGIS Enterprise configuration, you must resolve all errors that appear. You don't have to resolve warnings to share.

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

  3. After you successfuly share the web map, select the Manage web map link at the bottom of the pane to manage the web map in your portal.

    EsriEnterpriseFinishSharing

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

    EsriArcGISEnterpriseMapShare

    The image shows the shared map of the HongKong Roads table.

    EsriEnterpriseRoadsViewinSharedContent

    The image shows the shared map of the HongKong Population table.

    EsriEnterprisePopulationViewinSharedContent

  5. To save the map in your portal, select Save.

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

  7. Go to your portal and then navigate to the Contents section. Saved maps and data that you shared are there.

You can select 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!