Using a geodata service and a connected replica

If you have data in an ArcSDE geodatabase on-site, you might want to replicate some of that data to your enterprise geodatabase in the cloud. If you want to replicate less than 4 MB of data, you can use the connected replication workflow described in this topic.

You can create a geodata service from your enterprise geodatabase (EGDB) in the Amazon cloud, replicate data from your on-premises geodatabase to the geodata service, then synchronize changes made to your on-site geodatabase with your geodatabase in the cloud through the geodata service.

In most cases, you will want to edit your on-premises geodatabase, while leaving your geodatabase in the cloud read-only to the users who access it through the Internet. The replication workflow for this scenario is described here.

Prepare on-premises data for replication

Before you can replicate data, it must meet specific requirements:

Steps:
  1. Grant write access on the data to the user who will create the replica.
  2. Register as versioned the data to be included in the replica.
    NoteNote:

    The data must be fully versioned; it cannot be versioned with the option to move edits to base.

  3. Add a global ID column to each dataset that will be part of the replica.

Start an ArcGIS Server instance on Amazon EC2

If you have not done so already, launch an instance of ArcGIS Server. See Activating ArcGIS Server on Amazon for instructions.

Set up your geodatabase on Amazon EC2

If you are using ArcGIS Server Enterprise on Amazon and have not done so already, launch an enterprise geodatabase (EGDB) instance. See Launching an EGDB instance for instructions. You will use this geodatabase as the child geodatabase. Be sure to also create an elastic IP and associate that with your EGDB instance.

If you are using ArcGIS Server Workgroup on Amazon, create a geodatabase on your database server to be used as the child geodatabase. Follow steps 2 through 8 in Workgroup geodatabases in the cloud to do this.

Connect to your geodatabase

Use Remote Desktop to connect to your ArcGIS Server instance and connect to your geodatabase from ArcCatalog.

NoteNote:

If you are using ArcGIS Server Workgroup, you connected to the geodatabase in the last section. Skip step 1 in the following set of steps.

By default, the ArcSDE connection file is stored in the ArcCatalog folder in the profile directory of the Windows login used when creating the file. For example, a connection file named egdb1.sde would be found in C:\Users\yousir\AppData\Roaming\ESRI\Desktop 10.0\ArcCatalog.

The ArcGIS SOC account must have access to the ArcSDE connection file. Therefore, you should copy the sde connection file to a location where the SOC account can access it.

Steps:
  1. From ArcCatalog on your ArcGIS Server instance, create a connection to your EGDB.
  2. Open Windows Explorer and navigate to the directory where the .sde file is stored.

    For example: C:\Users\Administrator\AppData\Roaming\ESRI\Desktop 10.0\ArcCatalog\Connection to egdb.sde

  3. Copy the .sde file and paste it in a location on the server to which the ArcGIS SOC account has access.

    For example, D:\GIS Data\GIS Data

  4. Add a folder connection to the new location in ArcCatalog.
    1. Right-click Catalog in the Catalog tree and click Connect Folder.
    2. Navigate to the folder to which you copied the .sde file and click OK.

      The folder appears in the Catalog tree.

  5. Open the folder and double-click the .sde connection file to connect to the geodatabase.

Publish a geodata service

Publish a geodata service from your geodatabase on Amazon EC2.

Geodata services can be published from ArcCatalog or ArcGIS Server Manager. These instructions use ArcCatalog.

Steps:
  1. Right-click the geodatabase connection and click Publish to ArcGIS Server.
  2. Choose the server to which you want to publish the geodata service.
  3. Type a name for the service.
  4. Choose the location on the server in which the service will reside.
  5. Click Next.
  6. Keep Geodata Service checked. Additionally, you can choose other capabilities you want for the service.

    See Geodata service capabilities and allowed operations for information on capabilities for geodata services.

  7. Review the information you specified for the service. Be sure to note the service's URL.

    You cannot enter this URL in a browser directly, but you can enter the URL and append ?wsdl to see the Web service definition and verify that the service is working correctly.

The service is listed under the GIS Servers node in the Catalog tree.

Set the geodata service for replication

You must set the service to allow replication so you can synchronize data through the service.

The service must be stopped for you to change its properties.

Steps:
  1. Right-click the geodata service under the GIS Servers node in ArcCatalog and click Stop.
  2. Right-click the geodata service and click Service Properties.

    The ArcGIS Server - GeoData Service Properties dialog box opens.

  3. Click the Capabilities tab.
  4. Click Replication under Operations allowed.
  5. Click OK.
  6. Right-click your geodata service and click Start.

Add your geodata service to an on-premises ArcGIS Desktop client

To replicate to the geodata service, you must be able to access it from the Desktop client from which you will replicate. Therefore, you must add your geodata service to the GIS Servers list in the Catalog tree.

NoteNote:

If you stop your ArcGIS Server instance and restart it, you must re-add your ArcGIS Server connection to ArcGIS Desktop, since restarting the ArcGIS Server instance changes the IP address.

Steps:
  1. Open ArcCatalog on an on-premises computer.
  2. Expand the GIS Servers node in the Catalog tree.
  3. Double-click Add ArcGIS Server.

    The Add ArcGIS Server dialog box opens.

  4. Choose Use GIS Services and click Next.
  5. Type the server URL for the geodata service.

    This is the URL you noted when you published the geodata service.

  6. Click Finish.

Replicate through the geodata service using the Create Replica wizard

Use the Create Replica wizard in ArcMap to replicate data to your EGDB in the Amazon cloud.

Steps:
  1. Open ArcMap.

    Start > All Programs > ArcGIS > ArcMap 10

  2. Add the data from your on-premises ArcSDE geodatabase that you want to replicate to your EGDB in the Amazon cloud.
  3. Open the Distributed Geodatabase toolbar.

    Customize > Toobars > Distributed Geodatabase

  4. Click the Create Replica button Create Replica on the Distributed Geodatabase toolbar.
  5. Choose One way replica and click Next.
  6. Choose to replicate Data to a Geodatabase.
  7. Click the Open button Open, navigate to your geodata service, then click OK.
  8. Type a name for your replica.
  9. Click Show advanced options for overriding replica defaults when I click Next.
  10. The dialog box should look similar to the following:

    Create Replica wizard

    TipTip:

    If you are using all the default settings, you can uncheck Show advanced options for overriding replica defaults when I click Next.

  11. Click Next.
  12. Choose which replication model to use.
    • If the data you are replicating participates in geodatabase functionality, such as geometric networks, topologies, or relationship classes, click Full Model. (This is the default model.)
    • If your data does not use any geodatabase functionality and you do not need the data in the child replica to be versioned, choose Simple Model.
  13. Click Next.
  14. Choose the extent of the data to replicate.
    • If you only want the data that appears in the current map extent, choose The current display extent. (This is the default data extent to replicate.)
    • If you want the full extent of the data in the ArcMap table of contents, choose The full extent of the data.
    • If you drew a graphic around the data in the map and only want to replicate the data that is inside that graphic, choose The boundary of the currently selected graphic.
    • If you want a specific extent, choose The following extent: and type the values of the extent you want.
  15. Click Next.
  16. If there are relationship classes in the data, you will be given the option to include or exclude the related data. Click Next when you are done specifying which related data to include in the replica.

    By default, related data is replicated.

  17. You can click Summary to see all the information you provided for creating the replica. Click OK to close the summary when you have finished reviewing it.
  18. If you need to change any of the values, click Back and make the changes.
  19. If no changes are needed, click Finish.

The data is replicated to the service. If you get the message The requested capability is not supported, make sure the replication operation is enabled on the service.

Edit data in the on-premises ArcSDE geodatabase

Edit data in your on-premises ArcSDE geodatabase as you normally would. If you edit in other geodatabase versions, changes must be posted to the parent replica version if you want those edits to be synchronized with the child replica.

Synchronize edits

You can synchronize after a set of edits, or synchronize on a specific schedule, for example, at then end of each day. Once the edits you want to synchronize are completed and have been posted to the parent version, you can use the Synchronize button on the Distributed Data toolbar or script synchronization through your geodata service.

When you synchronize data, you must connect as the same database user that created the replica or as the ArcSDE administrator.

For more information on synchronization, see Synchronizing connected replicas in the ArcGIS Server help.

Synchronizing in ArcMap

In this workflow, you have a map open that contains the replicated data that has been edited.

Steps:
  1. Open the Distributed Geodatabase toolbar.

    Customize > Toolbars > Distributed Geodatabase

  2. Click the Synchronize Changes Synchronize Changes button on the Distributed Geodatabase toolbar.

    The Synchronize Changes Wizard dialog box opens.

  3. All the information on the Synchronize Changes Wizard dialog box is provided automatically. You only need to alter information on this wizard if you have multiple replicas, you re-created your ArcGIS Server connection and need to specify a new relative replica, or you are using two-way replication and want to replicate from the geodata service to your on-premises geodatabase.
  4. When you confirm the information on the wizard, click Finish to start the synchronization.

Scripting synchronization

You can write a script to synchronize your geodatabases. See How to synchronize a replica in a connected environment in the ArcGIS Desktop .NET SDK for a sample script.


1/30/2013