Hey folks,
I am trying to run a script that looks for unused domains in our SDE. It was complaining about an FC that didnt exist and crashed so I am trying to isolate the error down.
import arcpy, os
# get the SDE connection as a variable
sdeConnection = "Database Connections\\cityfsj on sqlserver dataowner EditVersion.sde"
allFcsAndTables = []
walk = arcpy.da.Walk(sdeConnection, datatype=["FeatureClass", "Table"])
for dirpath, dirname, filenames in walk:
for filename in filenames:
allFcsAndTables.append(os.path.join(dirpath, filename))
with open(r'c:\data\test.txt', 'w') as fp:
for item in allFcsAndTables:
# write each item on a new line
fp.write("%s\n" % item)
print('Done')
# clean up the walk object
del walk
Running this lists a feature class that I cannot for the life of me find in Arc Catalog of SQL manager looking at the tables.
Anyone know what leftovers would cause it to list in this script but be missing else where?
Thanks
Running Diagnose Version Tables seems to have resolved it? I was able to create an FC with the same name and delete it after running it. Not sure why or how this even happened in the first place but thats it was fixed for anyone that finds this through google.