We're trying to track down the map services that are using a specific data store. It seems the closest I can get to that information is with the ArcGIS Data Store command utility's describedatastore (ArcGIS Data Store command utility reference—ArcGIS Data Store (Windows) Installation Guide | ArcGIS Enterprise) command which is limited to the number of current feature layer connections and nothing more. Is it possible to get these details some other way?
If you really want REST API based solution, there is a manifest.json end-point for each map service. e.g.
https://server.FQDN.com:6443/arcgis/admin/services/FOLDER/SERVICE.MapServer/iteminfo/manifest/manifest.json?f=json&token…
This gives you details of database/FGDB connections and layers for each. e.g.
{ "databases": [ { "byReference": true, "onServerWorkspaceFactoryProgID": "esriDataSourcesGDB.SdeWorkspaceFactory", "onServerConnectionString": "ENCRYPTED_PASSWORD=3345435we23232543546456567;SERVER=DBSERVER;INSTANCE=sde:sqlserver:DBSERVER;DBCLIENT=sqlserver;DB_CONNECTION_PROPERTIES=DBSERVER;DATABASE=TESTDB;USER=dbadmin;AUTHENTICATION_MODE=DBMS;BRANCH=sde.DEFAULT", "onPremiseConnectionString": "ENCRYPTED_PASSWORD=3345435we23232543546456567;SERVER=DBSERVER;INSTANCE=sde:sqlserver:DBSERVER;DBCLIENT=sqlserver;DB_CONNECTION_PROPERTIES=DBSERVER;DATABASE=TESTDB;USER=dbadmin;AUTHENTICATION_MODE=DBMS;BRANCH=sde.DEFAULT", "onServerName": "sde.DEFAULT (DBSERVER)", "onPremisePath": "", "datasets": [ { "onServerName": "ServiceTerritory" }, { "onServerName": "StructureBoundary" }, { "onServerName": "WaterDevice" }, { "onServerName": "StructureLine" }, { "onServerName": "WaterJunction" }, { "onServerName": "WaterAssembly" }, { "onServerName": "StructureJunction" }, { "onServerName": "WaterLine" }, { "onServerName": "WaterSubnetLine" }, { "onServerName": "WaterDistribution" }, { "onServerName": "HydrantMaintenanceInspection" }, { "onServerName": "ValveInspection" } ] } ], "resources": [ { "onPremisePath": "D:\\TEST\\General\\UtilityNetwork\\WaterNetwork\\V2.4\\WaterDistributionUtilityNetwork.aprx", "clientName": "DBSERVER", "serverPath": "D:\\AGSEnterprise\\Server\\directories\\arcgissystem\\arcgisinput\\UN\\NapervilleWater.MapServer\\extracted\\p20\\NapervilleWater.msd" } ]}
Hi @DurhamGIS sorry to revive an old thread but you should check out Qonda Reports. It does exactly what you are asking. https://getqonda.com/
Hi VishApte
My experience with the manifest is that you cannot find information on which mapserver layer id that correspond to which dataset. Also, the order of the datasets in the manifest does not correspond to the order of the layers in the map service, even for a simple service using a single database and no group layers.
Do you have a simple way to do this? The only way i've found is to download a complete service backup, extract it and the MSDs inside, then traverse the xml-files inside to connect the layer id with the correct dataset.
Thanks!
Hi Vish Apte
Ah yeah, the manifiest.json. Yeah, querying this via REST will definitely work.
Cheers Vish.
Regards,
Derrick
Hi Durham GIS
There isn't one that I am aware of unfortunately. You can however automate it using python/java/C# and their respective ArcGIS API; Have your script loop through the root folder and read each mxd and generate a report for you.
Hope that helps.
If this answer was helpful please mark it as helpful. If this answer solved your question please mark it as the answer to help others who have the same question.
I also wish there were a way to rename a registered data store! Publishers have found it very easy to register a enterprise database when publishing but they don't follow our agency's naming scheme. Most publisher register data stores have very vague name and many don't distinguish between dev, test and prod data sources.
That is helpful to know but I was hoping for a REST API solution if possible in order to automate.
Hi Joe Catanzarita
You are correct, the relational datastore stores the Portal's hosted feature layer data. When Durham GIS mentioned ArcGIS DS, i assumed he meant the hosted feature services.
Durham GIS, if you were referring to the services published from your Enterprise GeoDatabase, you can navigate to:
...\arcgisserver\directories\arcgissystem\arcgisinput\xyz\extracted\v101 where xyz is the map service name.
The folder will match the structure in the ArcGIS Server REST endpoint:
The mxd (if published via ArcMap) will tell you where the source data resides..
Hopefully, that's what you are looking for.
My interest is in the registered data store details. We have several of them with some possible duplication based on the name that was given during the registration process. We didn't want to unregister any data stores without knowing what services are using them.
Durham GIS
This may be worthwhile to wait and verify from Derrick, however I don't believe Map Services are stored in your ArcGIS Data Store. Hosted content is stored in the ArcGIS Data Store, i.e. Hosted Feature Layers, outputs from Portal Analysis Tools, etc.
Here is some information on Data Store: What is ArcGIS Data Store?—ArcGIS Data Store (Windows) Installation Guide | Documentation for ArcGIS Enterprise
When it comes to Map Services, either you're copying the data directly to ArcGIS Server or you're going to be using a registered connection. If using the registered connection, Server will read the Map Service based on what's being referenced via the source database.
The above workflow seems to be applicable to only Hosted layers.
Best,
Joe
Thanks Derrick, I really appreciate the guidance and screen grabs. I checked some hosted FeatureServer services and can see the datastore information but this information doesn't seem to be available for MapServer services.
Log in to your ArcGIS Server Admin page as an adminstrator:
https://machinename/arcgis/admin
under services > Hosted, navigate to the service of interest.
e.g.
If you click on the edit button at the bottom:
In the JSON, under database > datasource, you should see something like AGSDatastore_ds_xyz
Take note of the above mentioned datastore "id".
Now go into data > items > enterpriseDatabases > <datastore id> and click on edit.
In the JSON, under machines, you should be able to see where the datastore was installed. The service would reside on this datastore on this machine.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.