Much like how GEO-Jobe's Admin Tools for ArcGIS Online allows administrators to view item dependencies for layers or maps in ArcGIS Online, is there a tool administrators of an SDE database can use to view all of the MXD's within an organization that depend upon a SDE layer in ArcGIS Enterprise?
Our county would like to clean up SDE layers no longer used by any current initiatives across the entire organization, so a tool like GEO-Jobe's but for SDE layers not online layers would be extremely helpful.
Here is a starting point: How To: Use Python to list the data sources of all layers in the table of contents of a map document
import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") for lyr in arcpy.mapping.ListLayers(mxd): if lyr.supports("DATASOURCE"): print "Layer: " + lyr.name + " Source: " + lyr.dataSource
I tested this on my test MXD and it listed both file geodatabase and enterprise geodatabase sources. The enterprise geodatabase are linked to the connection files used (i.e. "name.sde").
Thanks for your reply, but I'm looking for the reverse of this and at an organization level. I want to know all of the MXD's on my domain network that reference a given SDE layer not what layers are used in 1 MXD. But, I imagine you are correct in Python being the starting point. Unfortunately for me, I'm not a server admin, so I don't have access to running Python on the server housing the SDE layers. But, whatever the solution ends up being, I will pass it onto the server admins. Thanks again.
We would also like the ability Gene requests. Not really the MXD but the service. I would like to click on a layer in SDE, and see all the published services that depend on it. That would be very useful. (i.e. if we change a schema or move or rename a layer... what breaks, is the question) Gene does this sound like it would be useful for you as well?
I am not sure that there is a way to do it backwards from the feature class level. The only place that I can think to start would be the process information table to see what machines are connected. The connection information would only have the machine name and not the specific services being used.
You could use the script above, via Python, to search, report and aggregate all the connection information from the MXD's. I would say that this would be a highly customized process.
It would be helpful as a built-in function for any org with SDE to be able to trace service dependencies. As far as MXDs were you referring to what data sources are in the MXD? I'm familiar with that, but for me it's more of what services are being used by a layer in SDE; not what layer sources are in the MXD. The MXD does a good job with that and setting them in bulk in Catalog also works well, if they need to be changed. For me it's always finding what service is preventing a schema change or so forth. I track them down manually. Thank you George for the info and I may look in to some scripting on it.