When adding event layers by way of data stored in a .dbf file, ArcGIS server should automatically assign a unique ObjectID (OID) to each event. The OID is required by ArcGIS server to select event features.
When working with event layers by way of data stored in an ArcSDE/database, a few additional steps must be taken. A non-spatial, unregistered (ArcSDE) database table can be used as an event layer, but the event features are not selectable. To select the features, they must have an OID.
There are two methods for adding an OID to an event layer by way of ArcSDE:
When registering a database table using ArcCatalog, it automatically adds an ArcSDE-maintained OID column. Since ArcSDE is responsible for maintaining this column, updates must occur in an ESRI product such as ArcCatalog, ArcObjects, or the ArcSDE API. This verifies that the appropriate geodatabase events are triggered.
If any updates occur outside an ESRI product, for example by way of SQL, problems may occur because ArcSDE and the geodatabase are unaware of the change. In this case, a user-maintained OID column should be defined. This column must be integer, not null, and unique. An existing column can be used as long as the contents adhere to these restrictions.
A user-maintained OID can be set using the sdetable command. For example:
>sdetable -o register -t dynseg_events_reguser -c userid -C USER -u ims -p ims
where 'userid' is the OID column name and 'USER' tells ArcSDE to let the user's application modify the OID column.
Unregister the table before reregistering with the user-maintained column.
By default, ArcGIS server caches event data. An EventSource, also an event layer, relies on the events fired by the geodatabase object model to know when to update itself.
-if the event table is edited by an application that causes the geodatabase events to be fired; for example, in ArcMap, a client application recognizes the changes and the cache is updated.
-if the event table is being edited by software that does not cause the geodatabase events to be fired; for example, in SQLPlus, the client application does not recognize that changes have been made and uses cached event data. To view the changes, the application must be restarted or refreshed.
WARNING: The instructions below include making changes to essential parts of your operating system. It is recommended that you backup your operating system and files, including the registry, before proceeding. Consult with a qualified computer systems professional, if necessary.
ESRI cannot guarantee results from incorrect modifications while following these instructions. Therefore, use caution and proceed at your own risk.
To bypass the cache, set the 'UseOptimization' DWORD decimal value to 0, under the DynSeg key, to disable the cache. When the cache is disabled, the ArcGIS service recognizes updates and inserts them to an event layer without needing to refresh. If the value is 1, the cache is turned on, in which case the ArcGIS service must be refreshed to see the changes.
For the ArcGIS SOC account to read this key successfully, the key must be set in two places:
The ArcGIS SOC account needs to be logged into the machine to set the CURRENT_USER key correctly.