From the RDBMS directly, you can use the following queries:To get a list of all tables registered with the geodatabase, use:select table_name from sde.TABLE_REGISTRY;To get a list of all layers (i.e., all GDB-registered tables which have a spatial column) within SDE, use:select table_name from sde.LAYERS;If you are wanting to know more spatial-specific information, the following Python script has worked for me (substitute your own info):import os, subprocess, arcgisscripting, string, sys, osgp = arcgisscripting.create(9.3)gp.workspace = r"C:\Users\User1\AppData\Roaming\ESRI\ArcCatalog\test.sde" server = 'server'def describeFeatures(sdeWorkspace,logWorkspace, logName,instance,user, psswd): logfile = open(os.path.join(logWorkspace, logName), 'w') datasets = gp.listdatasets("","") for dataset in datasets: gp.workspace = sdeWorkspace + os.sep + dataset for fc in gp.ListFeatureClasses(): args = ['sdelayer', '-o', 'describe_long', '-l', str(fc) + ',SHAPE','-i', instance, \ '-u', user, '-p', psswd, '-s', server] p = subprocess.Popen(args, stdout=subprocess.PIPE) output = p.stdout.read() logfile.write(fc) logfile.write(output) logfile.write("\n") print fc, output logfile.close()if __name__== "__main__": #connection to database sdeWorkspace = gp.workspace logName = "FeatureInfo.txt" logWorkspace = r"C:\Users\user1\Documents\python\DescribeFeatureClasses" instance = 'esri_metrorep' user = 'sde' psswd = 'sde' describeFeatures(sdeWorkspace,logWorkspace, logName,instance,user,psswd)
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.