Labels Not Displaying for Query Layers from SQL Server Database (ArcPro 3.0.2)

1003
4
12-16-2022 01:42 PM
Labels (2)
aakims
by
New Contributor II

I'm experiencing an issue with displaying labels for query layers that are sourced from the SQL Server Database Connection. 

I am using ArcPro 3.0.2 and SQL Server 2019. My team recently upgraded from Pro 2.6, and this definitely wasn't an issue with the older version, but not certain if this never worked on ArcPro 3.0.2 or if it suddenly stopped working. 

No error message is given, but no label draws. I can confirm that the label properties are set correctly because as soon as I export the layer as a shapefile, all the labels show up (as expected) from the new shapefile layer that gets added after the export completes. This issue affects point, polyline, and polygon layers.

I couldn't find anyone experiencing the same issue, but I did find that something sort of similar was reported with ArcPro 2.2. Looks like ESRI had to put out a patch to fix it. 

I did see that Pro 3.0.3 is out but didn't find this issue mentioned in the release note, so I haven't upgraded. Any idea what I should try to fix this? 

Thanks!

 

 

0 Kudos
4 Replies
Robert_LeClair
Esri Notable Contributor

The only thing I saw on the internals was with a customer using ArcMap 10.6.1 and a SQL Server database.  They went in and deleted a user defined attribute index and rebuilt said attribute index and the label appeared as expected.  By chance do you have any user defined attribute indexes on your query layer?

Beyond this, when you upgraded ArcGIS Pro 2.6 to ArcGIS Pro 3.0, did you do a clean uninstall and reinstall of the software?  In addition to this (since it was a big jump in versions) is to rename the ESRI folder in your C:/users/<user_profile>/appdata/local and C:/users/<user_profile>/appdata/roaming to ESRI_OLD.  Sometimes this fixes strange issues like this...

0 Kudos
aakims
by
New Contributor II

Thanks for your suggestions, @Robert_LeClair, I really appreciate it. I finally got around to trying all of what you mentioned.

  1. Attribute indexes: the database objects we pull into ArcPro from the SQL server (more often than not) have unique indexes (primary key or clustered index) and spatial indexes on them. But once they are added as a query layer, we do not utilize geoprocessing tools to add or remove attribute indexes in ArcPro. I tried bringing in a table without any user-created index in SQL just to see if that makes any difference, but still not showing labels. I tried using the "Remove Attribute Index" geoprocessing tool, which did show me the layer had the primary key I had put on it in SQL, as well as something that's named "FDO_<LayerName>," which I did not create. I'm assuming this is something that ArcGIS does when I add the layer to the map? I was unable to remove either index and was given the same error code "ERROR 160236: The operation is not supported by this implementation." I failed and received the same error when I tried adding an attribute index using the "Add Attribute Index" tool. Does any of these details tell you anything about my issue? 
  2. Update installation: IT tells me that they did not uninstall v2.6 when installing the update, but they did use the installer. Their guess is that the installer removes v2.x and installs v3.x. They are not experts with ESRI products. Is this true? Should we try uninstalling and then installing clean as you suggested?
  3. Renaming the user appdata folders: I tried renaming the ESRI folders at both paths, but the issue didn't resolve. 
0 Kudos
Robert_LeClair
Esri Notable Contributor

You're welcome @aakims - digging a little deeper, I found something that may be of interest.  At ArcMap 10.6.1 and ArcGIS Pro 2.2, Esri stopped validating 3rd party spatial types (like GEOMETRY and GEOGRAPHY) so some issues (perhaps like this) may arise if tables are created in earlier versions of the software.  These do not validate with updated rules.  One thing to test is in SQL Server Management Studio, create a new GEOMETRY or GEOGRAPHY table (depends on your default spatial type) with the same schema and load the data from the original SQL Server layer into the new layer.  You can use the ArcGIS Pro Append GP tool or in ArcMap, right-click on the layer and choose Load Data.  This will load the features from the "old" table to the "new" table.  Then try the labeling workflow again via a new query layer.  What is the result?

0 Kudos
LaurentP
New Contributor II

Hi, I'm also getting this issue in Pro 3.1.3, but not with previous version. Did you solve it?

0 Kudos