By publishing ArcGIS Server web layers in bulk from a database data store item in the portal, you create feature layers and map image layers for all feature classes and tables in the database to which your connection has access. As new datasets are made available to you through that same database connection or access to the datasets is removed, you can manually synchronize the database content with your layers in the portal. You can identify what dataset was published to create each layer. If necessary, you can also delete all the layers you published in bulk from a data store item.
Synchronize database content and layers
The content in a database changes over time—feature classes and tables are added and, occasionally, removed. Access to existing data can also change over time if owners or database administrators alter permissions on the datasets. All of these actions can lead to your database data store item and bulk-published layers getting out of sync.
As access to content in the database changes, you can synchronize the layers. If a source feature class or table is removed from the database or privileges are revoked from the user connecting to the database, the corresponding feature and map image layers will be removed from the portal. Similarly, layers will be created in the portal for feature classes and tables added to the database or for which access is newly granted to the login used to access the database through the data store item. Only the owner of the data store item can synchronize layers and the database.
Note:
Synchronization only adds or removes layers based on your access to the data in the database; it does not update the names or schemas of the layer items when those change in the source feature class or table.
If you rename source feature classes and tables in the database, synchronization identifies these as new datasets. The layers with the old name will be deleted from the portal and federated server, and new layers will be published with the new name and new URLs. As with all deletions, any map or app that used the old layer will no longer have access to the data.
Follow these steps to synchronize content in the source database with web layer items in the portal:
- Sign in to the portal that contains the data store item.
You must be the owner of the data store item.
- Open the details page for the data store item and click the Layers tab.
- Click Sync Layers.
- After reading the message that appears, click Yes if you want to proceed with synchronizing the layers with content in the underlying database.
The amount of time this takes depends on how many changes have been made to the content in the database.
Identify layers and source data
The information provided on the Layers tab of the data store item's details page allows you, as the data store item owner, to identify what source dataset is populating each feature and map image layer. Only the data store owner has access to the Layers tab and this information. The Dataset column on the Layers tab shows you the fully qualified name of the feature class or table in the format <database_name>.<dataset_owner>.<table_name>.
To help you find a specific bulk-published layer, you can do any of the following on the Layers tab:
- Change the order of the layers in the list on the Layers tab. By default, the list is sorted by the date the layer was created. To change how the list is sorted, click the sort button and choose a new sort method.
- If you know the layer name or part of the layer name, type it in the search box. This returns only those layers that have a name with that text in it. To clear the search, click the X in the search box.
- To view or update a layer's details, click the layer name in the list.
As with any other layer, you (and other portal members with whom you share the layers) can use the filters and search capabilities available on the Contents page to find specific bulk-published layers.
Delete all bulk-published layers
In rare instances, you may need to remove all layers so that you can delete a data store item. There is an option on the Layers tab of the database data store item that allows you to do this.
Before you delete layers, be sure you have removed them from any maps you or others were using them in. If you do not, the layers will be broken within those maps. To delete all layers, click Delete all created layers on the Layers tab of the database data store item.
Note:
It is also possible to delete individual layers from My Content. However, do not delete only a feature layer. Even if you delete both the map image layer and feature layer, they will be re-created when you next synchronize with the database unless the source feature class in the database is no longer available to you (for example, if the data owner has revoked your access to the source feature class or table or deleted them from the database).