When you publish a map service to your ArcGIS Server site, you can optionally choose to allow clients of the server, such as the ArcGIS Web APIs, to dynamically change layer appearance and behavior in your map service. Determining which layers will appear in a map, layer symbology, layer order and position, labeling, and more, can be achieved on the server through the use of dynamic layers. In this way, dynamic layers can increase the amount of interaction that users are able to have with your maps.
If you want to dynamically add data to your map service, such as feature layers, feature classes, feature attribute tables, shapefiles, rasters, or standalone tables, you'll need to set up a workspace to contain the data you want to add. Dynamic workspaces can be any enterprise database, enterprise geodatabase, file geodatabase, or file directory on disk that is accessible to the server.
When you select a workspace, an ID is generated to uniquely identify the workspace within the pool of workspaces available to the map service. The map service uses this ID to connect to the data source specified in dynamic layer requests. You have the option to modify the ID when you configure the dynamic workspace for your map service.
Considerations when selecting a dynamic workspace
When selecting a dynamic workspace, it is recommended that the workspace only contain the layers and tables necessary to support the map service. If you're selecting an enterprise geodatabase as your dynamic workspace, the account connecting to the database should be granted minimum access privileges to the data. If possible, it is recommended that you have a separate production database to use as your dynamic workspace. To learn more about setting up data access privileges in a database, see the following topic specific to your database platform:
- User privileges in DB2
- User privileges in Informix
- User privileges in Netezza
- User privileges in Oracle
- User privileges in PostgreSQL
- User privileges in Teradata
If the above options are not possible in your environment, you should consider restricting access to your map services and web applications. You may also consider encrypting communication between the web application and your map service using HTTPS. This will encrypt service requests sent by the web application and help prevent a malicious party from obtaining the workspace ID. To learn more, see Restricting access to GIS web services.
Requirements for dynamic layers
The ArcGIS Server account must have at least read access to the dynamic workspaces that contain the data you want to dynamically add to the map service. To learn more about setting share and file permissions on your workspaces when publishing, see Making your data accessible to ArcGIS Server.
For a full list of dynamic layer requirements and the functionality exposed by dynamic layers in a map service, see Supported functionality in map services.