Friday, December 08, 2006
Posted on Friday, December 08, 2006 2:13:06 PM (Mountain Standard Time, UTC-07:00)  Comments [3] | 
Categories: ArcSDE
Ran into a problem loading data from a Personal Geodatabase, and thought I'd share the solution.

Scenario:
Data was coming from ArcSDE on Oracle, exported to a PGDB, and then I'm importing it into ArcSDE on SQL. We had to go this route because Xml Workspace export threw errors.

Error Message:
The error effectively says that the field length exceeds the maximum for a datatype.


After some digging around, I figured out the problem:
  1. The string field in a layer in ArcSDE on Oracle has a length of 2000
  2. During the export to Personal Geodatabase, this field becomes a "memo" because a string field in access has a max length of 254.
  3. When re-importing into ArcSDE, Catalog interprets the length of the field as 2147483647, which is too big, and the import fails.
The question is - how can I get this data back into ArcSDE?

Solution:
  1. Export the schema for the layer as Xml
  2. Edit the Xml and change the field length back to 2000
  3. Create the featureclass from the Xml
  4. Use the Object Loader to transfer features from the layer in the PGDB into ArcSDE.

Friday, December 08, 2006 8:23:19 PM (Mountain Standard Time, UTC-07:00)
This is one of the ugly sides of going pGDB --> ArcSDE on SQL Server. I don't know of any other way to get around the memo field issue than the work around you outlined. One question though: why not go directly from Oracle to SQL Server? No connectivity between the two?
Derek Swingley
Saturday, December 09, 2006 12:04:23 AM (Mountain Standard Time, UTC-07:00)
Does the new File GDB offer a better alternative for handling the long string fields definitions? Since it was designed from the ground up by ESRI, maybe it can handles the fields better than the JET-based Personal GDB. Anyone know?

Ron
Ron Bruder
Saturday, December 09, 2006 9:48:54 AM (Mountain Standard Time, UTC-07:00)
Derek - exactly - this was a client sending us data to use while we develop a portal for them. We tried Xml export, but that threw errors. It's a great feature, but it need to say what the problem is when it fails.

Ron - The client is still running 9.1, so File GDB was not an option. On our end, I just threw it into a 9.1 instance - mainly because we have not moved our dedicated ArcSDE systems to 9.2 yet (still running in small VMs we used during the beta - which is great for testing, but performance is not too hot)
Dave
Comments are closed.