How to determine which map services are using a specific data store?

5590
12
Jump to solution
06-22-2020 01:51 PM
DurhamGIS
Occasional Contributor

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 ...) 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?

0 Kudos
1 Solution

Accepted Solutions
VishApte
Esri Contributor

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/manife... 

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"
}
]
}

View solution in original post

12 Replies
DerrickWong
Esri Contributor

Hi Durham GIS

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_xxxxxx

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.

Hope that helps.

Regards,

Derrick

DurhamGIS
Occasional Contributor

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.

0 Kudos
JoeCatanzarita
Emerging Contributor

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... 

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

0 Kudos
DurhamGIS
Occasional Contributor

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.

0 Kudos
RandyKreuziger1
Frequent Contributor

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.

0 Kudos
DerrickWong
Esri Contributor

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\XXX\extracted\v101 where XXX 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.

Regards,

Derrick

DurhamGIS
Occasional Contributor

That is helpful to know but I was hoping for a REST API solution if possible in order to automate.

0 Kudos
DerrickWong
Esri Contributor

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.

Derrick


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.

0 Kudos
VishApte
Esri Contributor

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/manife... 

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"
}
]
}