Tag Archives: arcgis

ArcSDE 10: DBMS table not found [*********][STATE_ID=0]

I recently bumped into a problem when moving my development ArcSDE Geodatabase to another machine. The ArcSDE Geodatabase is running on MS SQL Standard* and is using schema’s to store data for different projects.

After restoring the database on the new machine and trying to access it in ArcCatalog I got the following error message:

DBMS table not found [*********][STATE_ID=0]

This lead me to ArcGIS bug report NIM059178 / Article ID: 38048.

Which has a patch attached, but this patch only solved the connectivity within ArcCatalog and didn’t solve the problem when accessing the ArcSDE from my Python scripts (through the ArcGIS REST Services).

After some digging around I discovered that I didn’t install ArcSDE Service Pack 1 yet. Bug NIM059178 is also part of this Service Pack. Shame on me!

I also took the opportunity to install ArcSDE Service Pack 2, but this SP isn’t necessary to solve this specific issue.

All the different ArcGIS packages (Desktop, Services, etc) have a copy of SP1 and SP2 available and as always, it’s wise to update. You can use Patch Finder to check which version you are currently running – available at the bottom of this link.

I hope this post is helpful for somebody that is encountering the same issue..

*) You need MS SQL Standard or better to use Schemas with ArcSDE Geodatabase. MS SQL Express doesn’t support this with ArcSDE.

Tips & Tricks: FieldExists for ArcGIS 10 Python

Here is a way to check if a Field in a feature class already exists or not. I was looking for an existing ArcGIS Esri function / tool but couldn’t find one so I wrote my own.

def FieldExist(featureclass, fieldname):
    fieldList = arcpy.ListFields(featureclass, fieldname)

    fieldCount = len(fieldList)

    if (fieldCount == 1):
        return True
    else:
        return False

This is a function and it assumes you have already set the workspace environment.

Usage:

        if (not FieldExist(myFeatureClass, "myField")):
          arcpy.AddError("Field 'myField' does not exist in " + myFeatureClass)
          sys.exit()

hope this is helpful.

Esri DevSummit presentation

Title:

Silverlight: How to Display Dynamically Created Layers in Your RIA Application

Description:

The best way to access map layers in a Silverlight application is by consuming lightweight services such as the REST endpoints. In many cases, the map data is collected, created, or combined dynamically rather than published statically.

We will demonstrate how to use the Esri Silverlight Software Developer Kit (SDK) to execute a geoprocessor task on the REST endpoint and display the results to the user using two different techniques: a result map service and a dynamically created MapServer service.

The geoprocessor tasks consist of Python scripts based on the ArcGIS API for Python (ArcPy).

We will also discuss some issues we encountered and best practices and show techniques for debugging your Silverlight application when communicating with the different ArcGIS services.

This demonstration is based on a noise modeling application that Foliage developed for one of its customers.

—————–

The presentation with full source-code can be downloaded HERE.

It tries to explain two concepts:

1) How to dynamically create a MapServer service (during runtime)

2) How to use the Result Map Service.

And discusses reasons why you want to use this and how you can debug it.

Go to the Esri website for all the additional information (when, where, etc). Esri will also record the presentation and make it available as a video.

I hope you like it! Leave a comment or contact me if you have any comments or questions!

UPDATE 3/9/2011: Make sure you set up a host alias for esridevsummit to point to your localhost, you can do this in c:\windows\system32\drivers\etc\hosts; add the following:

127.0.0.1 esridevsummit

this will also help you to debug your communication using Fiddler.

UPDATE 3/24/2011: You can download the presentation HERE or watch it online at the Esri website

UPDATE 4/04/2011: Embedded the video, removed the download.

ESRI DevSummit presentation from Bjorn Kuiper on Vimeo.