Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # @date 23/03/2015
- # @author Cindy Williams
- #
- # Prints the list of databases registered with the
- # given ArcGIS Server, along with the connection
- # properties (excluding ENCRYPTED_PASSWORD).
- #
- # For use in the Python window in ArcCatalog.
- #
- import arcpy
- import os
- folder_user = os.environ['USERPROFILE']
- folder_arccatalog = "AppData\Roaming\ESRI\Desktop10.3\ArcCatalog"
- ags_name = "arcgis on dev01 (admin).ags"
- ags = os.path.join(folder_user, folder_arccatalog, ags_name)
- for dsi in arcpy.ListDataStoreItems(ags, "DATABASE"):
- print dsi[0] + "\n\t" + "\n\t".join(dsi[1].split(";")[1:])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement