Geodata services

A geodata service allows you to access a geodatabase through a local area network (LAN) or the Internet using ArcGIS Server. The service exposes the ability to perform geodatabase replication operations, make copies using data extraction and execute queries in the geodatabase. A geodata service may be added for any type of geodatabase including ArcSDE geodatabases, personal geodatabases and file geodatabases.

Geodata services are useful in situations where you need to access geodatabases in remote locations. For example, a company may want to set up ArcSDE geodatabases to manage data in its Los Angeles and New York offices. Once created, each office can publish its ArcSDE geodatabase on the Internet using a geodata service. The geodata services can then be used to create replicas for the ArcSDE geodatabases. With geodatabase replication, the geodata services can be also used to periodically synchronize the changes in each geodatabase over the Internet.

Before working with geodata services, you should have a basic understanding of how geodatabases, geodatabase replication, and data extraction work. The topic Understanding distributed data in the ArcGIS Desktop Help is a good starting point. Additionally, it's helpful to have some experience performing replication and data extraction in the ArcGIS Desktop environment before attempting these operations with ArcGIS Server.

Preparing the geodatabase in ArcGIS Desktop

The first step to publishing any GIS service is to create the GIS resource that it will reference. For geodata services, the resource is either an ArcSDE geodatabase, a personal geodatabase, or a file geodatabase. You can create any of these types of geodatabases using ArcCatalog. In the Geodatabases and ArcSDE section of the ArcGIS Desktop Help, you can find much information on geodatabase design and creation, starting with An overview of creating geodatabases. Additionally, ESRI Press has published several books on architecting effective geodatabases.

If you plan on using your geodata services for geodatabase replication, you must make sure that the data is configured properly and is from an ArcSDE geodatabase. See the topic Preparing data for replication in the ArcGIS Desktop Help for additional information.

Publishing a geodata service

Two types of publishing operations can yield a geodata service: Publishing from a geodatabase directly, and publishing a geodata service with a map service. Once published the geodata service can be used for synchronizing replicas or working with a geodatabase in a Web application or Web service.

Publishing a geodatabase directly

Publishing from a geodatabase directly involves referencing a personal geodatabase, file geodatabase or ArcSDE connection file that you want to publish as a service. The geodatabase or connection file needs to be in a location that is accessible by the SOC user. For example, ArcSDE geodatabases in ArcCatalog are located in your profile directory under Application Data\ESRI\ArcCatalog. (Example: C:\Documents and Settings\myUserName\Application Data\ESRI\ArcCatalog\Connection to myServer.sde) . Unless you were logged in as the SOC account when the SDE connection file was created, the SOC account does not have access to this file. Before publishing the geodata service, it is recommended that you copy the connection file to a common directory to which the SOC account has been granted access.

When publishing a geodata service from a Workgroup ArcSDE (SQL Express) geodatabase, you need to save the connection to your geodatabase in order to create the connection file. To do this, browse to the geodatabase in ArcCatalog under the Database Servers node of the catalog tree. Right-click the geodatabase you want to publish and click Save Connection. This creates a connection (.sde) file in your profile directory as described in the previous paragraph. You need to reference this connection file when publishing the geodatabase. As suggested, copy the connection file to a common location to which the SOC account has access before you publish the service.

Follow these steps to publish a geodata service:

  1. In Manager, click the Services tab.
  2. Click Publish GIS Resource.
  3. Enter the information as prompted, keeping in mind the following:
    • For Resource, browse to the geodatabase that you want to publish, or its connection (.sde) file if it is an ArcSDE geodatabase.
    • If you need additional help, see Publishing a GIS resource to the server

Publishing a geodata service with a map service

To publish a geodata service with a map service, you must enable geodata access from the capabilities list when publishing the map service. In this case, the map document must contain data from only one geodatabase. When the publishing process is completed, a map service and a geodata service with the same name are created and can be managed independently. Publishing a geodata service with a map service allows you to use the commands from the Distributed Geodatabase toolbar when you add the map service to ArcMap. The ArcGIS Desktop Help contains more information about using the commands on the Distributed Geodatabase toolbar.

Since the services are managed independently, you can configure each service to work well for different types of operations. For example, you may want to allow more instances and set longer timeouts to support replication operations with a geodata service. With the map service, however, you may want to keep shorter timeouts and limit the maximum number of instances to support operations such as viewing.

Follow these steps to publish a geodata service with a map service:

  1. In Manager, click the Services tab.
  2. Click Publish GIS Resource
  3. Enter the information as prompted, keeping in mind the following:
    • For Resource, browse to the map document that you want to publish.
    • When selecting capabilities, be sure to check the box next to "Geodata Access".
    • If you need additional help, see Publishing a GIS resource to the server

Allowed operations

By default, geodata services are created with Query and Data extraction as allowed operations. To perform geodatabase replication, you must manually allow the Replication operation. See this link from the topic Securing a service to learn about operations and how to set them.

Suggestions for configuring geodata services

When configuring a geodata service, consider the following:

Consuming the geodata service

The following diagram and examples describe how geodata services are consumed:

  1. Enterprise geodatabase: In the diagram above, a replica exists between an enterprise geodatabase in New York and an enterprise geodatabase in Los Angeles. The replica was created by first publishing the Los Angeles geodatabase as a geodata service with the Replication operation enabled in ArcGIS Server. An administrator in New York then accessed this geodata service over the Internet and used the ArcGIS Desktop tools to create a replica. (See the preceding section for information on how you can replicas from geodata services.)

    Once replicated, editors perform updates to each enterprise geodatase locally. The administrator in New York periodically runs a geoprocessing model to connect to the geodata service in Los Angeles and synchronize changes in both directions. This keeps the geodatabases synchronized, allowing users to access the same information at either location.

  2. Single User Geodatabases: There are also replicas between the Los Angeles enterprise geodatabase and local geodatabases running on field workers' laptops. The field workers disconnect from the network, make updates to their local geodatabases during the day and then synchronize with the Los Angeles database at the end of each day.

    In this case, field workers can use check-out replicas to personal or file geodatabases. At the end of each day the laptops are connected to the Los Angeles geodatabase and changes are checked in. Once check in completes, new check-outs needs to be created for the next days work. This can be done using a geoprocessing model that is scheduled to run overnight. To avoid having to run the check out process each night, two way replicas can be used instead of check-out replicas. A two way replica allows multiple synchronizations which can both send and receive changes. Therefore, at the end of the day, each laptop can run through a synchronization process to both upload changes and get the latest modifications from the Los Angeles geodatabase. Personal ArcSDE geodatabases running on each laptop can be used to create the two way replicas.

    These processes can be run locally in the office by plugging the field laptops into the LAN each night. In cases where the field workers are too remote to make it back to the office each night, they can also run the processes on the Internet. Here, instead of accessing the geodatabase directly, they connect to the geodata service published for the Los Angeles geodatabase over the Internet.

    Once integrated, the changes from the field workers are also shared with the New York office when the enterprise offices synchronize.

URL format

The URL for a Web-enabled geodata service takes the following format:

http://<server name>/<instance name>/services/<folder name (if the service resides in a folder)>/<service name>/geodataserver.

For example, if you had a service Lima in the folder Peru running on a server named myServer with the default instance name of "arcgis", the URL would look like this:

http://myServer/arcgis/services/Peru/Lima/geodataserver