5

Original question: I have found a lot of documentation on importing and using query layers from SQL Server into ArcCatalog/ArcMap/etc. However, when you change the projection of a feature class or use the editor tool in ArcMap (say to break up or split a polygon) then try to export it back into SQL Server, you cannot visualize the geometry when querying the table in sql server anymore.

I was wondering if anyone knew why this happened, and if there was a way to fix this either before you export into sql server or within sql server itself.

***************update*****************

I now know why I cannot see the spatial results in sql server; when exporting it is giving my feature class ESRI's default native geometry type, which SQL Server cannot visualize without conversion. From what I can find online, the "Migrate Storage" processing tool in ArcMap 10.3 should be able to fix this issue. However, after I ran the tool (and got a "succeeded" message in the results) it still does not show the shape column as a "geography" data type.

  • What version of SQL Server? Are you using ArcGIS or SDE on your server? Which version? – Midavalo Apr 25 '16 at 18:12
  • I use MS SQL Server 2012, accessing query layers and tables from a database connection in ESRI ArcMap 10.3. I did find a solution/workaround, so I'll post it to the question and then this issue can be closed. – user2635779 Apr 25 '16 at 18:38
  • Do you mean to ask how to convert an ArcSDE table in SQL Server Native GEOMETRY to SQL Server Native GEOGRAPHY? – DPSSpatial Apr 26 '16 at 15:53
1

The workaround I figured out I still don't think is the ideal way to do it, but for now will work.

Instead of using the Migrate Storage process in ArcMap, I simply opened up the catalog, right-clicked on my edited feature class/table in my connected db and selected "export" --> "to geodatabase (single)". In the export window, I was able open the optional geodatabase settings and select "Geography" for the configuration keyword (optional)

enter image description here

Now when I open SQL Server and query from the edited feature class I exported with type GEOGRAPHY, it will show the spatial results as well as the attributes, which is what I wanted.

I feel like this is a workaround and not a true solution/way of altering a feature class's data type, but I still wanted to post it in case others have the same question I did.

  • also discovered a potential reason why the migrate storage process runs and succeeds but doesn't do anything - According to ESRI documentation: If the editable feature layer contains m-values, you can't edit the geometry for existing features. To edit geometry for existing features in the layer, the layer owner must move the data with m-values to a separate layer (which can be in the same service). – user2635779 Apr 25 '16 at 20:33
  • Migrating a layer is likely to fragment it, impairing performance. Copying to a new table is actually superior to most migration options. – Vince Apr 26 '16 at 0:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.