Advertisement
Guest User

Untitled

a guest
May 6th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #
  2. # @date 23/03/2015
  3. # @author Cindy Williams
  4. #
  5. # Prints the list of databases registered with the
  6. # given ArcGIS Server, along with the connection
  7. # properties (excluding ENCRYPTED_PASSWORD).
  8. #
  9. # For use in the Python window in ArcCatalog.
  10. #
  11.  
  12. import arcpy
  13. import os
  14.  
  15. folder_user = os.environ['USERPROFILE']
  16. folder_arccatalog = "AppData\Roaming\ESRI\Desktop10.3\ArcCatalog"
  17. ags_name = "arcgis on dev01 (admin).ags"
  18. ags = os.path.join(folder_user, folder_arccatalog, ags_name)
  19.  
  20. for dsi in arcpy.ListDataStoreItems(ags, "DATABASE"):
  21. print dsi[0] + "\n\t" + "\n\t".join(dsi[1].split(";")[1:])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement