The problem with using SQL in pre-10.0 databases to query this information is that the same query won't work in 10.x instances. Both ArcObjects and Python can generatelists of feature datasets and the feature classes within them in a release-independentmanner. You'd have to poll each FC to deterimine if it was versioned.There are forums dedicated to both ArcObjects and Python where you could pursue thedetails for each, but be sure to specify your ArcGIS version and service pack, so theycan give you the most appropriate "best" solution.- V
import sys, string, os, arcgisscripting, logging log_File = "c:\\Documents and Settings\\apaul\\desktop\\sde_dataset_versioning.log" # Set up log file logger = logging.getLogger('myapp') hdlr = logging.FileHandler(log_File) formatter = logging.Formatter('%(message)s') hdlr.setFormatter(formatter) logger.addHandler(hdlr) logger.setLevel(logging.INFO) gp = arcgisscripting.create(9.3) gp.workspace = "C:\\Documents and Settings\\apaul\\\desktop\\sde_con.sde" fds = gp.ListDatasets() for fd in fds: gp.workspace = "C:\\Documents and Settings\\apaul\\\desktop\\sde_con.sde\\%s" % fd fcs = gp.ListFeatureClasses() try: fc1 = fcs[0] desc = gp.Describe(fc1).IsVersioned print fd,desc logger.info('%s %s'%(fd,desc)) except: pass
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.