<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to Add Spatial Reference to Database View in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/unable-to-add-spatial-reference-to-database-view/m-p/1680324#M45837</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/923685"&gt;@VenkataKondepati&lt;/a&gt;&amp;nbsp;this cleared up the partition issue. thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;fwiw, i needed to explicitly cast to INT, as the view tried to use bigint instead, which come to find out, is not supported by my SQL instance.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SELECT 
    CAST(ROW_NUMBER() OVER (ORDER BY t.OBJECTID) AS INT) AS RowID,
    t.OBJECTID AS TractsOID, &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I'm just getting done solving the projections issue, and I thought I'd share.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The core issue was a disconnect between the SQL database engine and the ESRI Geodatabase registry. To fix this, I performed a manual override of the layer's metadata system.&lt;/P&gt;&lt;P&gt;First, we created the view in SSMS and then registered it using geoprocessing tools in Pro (accepting the "Unknown" projection). Next, we ran a direct SQL update on the sde.SDE_layers system table to forcibly change the view's SRID from 0 to 6 (where 6 refers to the ID holding the spatial reference for my shape layer. I found this value by first querying the sde.SDE_layers table...&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SELECT layer_id, table_name, srid 
FROM sde.SDE_layers 
WHERE table_name = 'TRACTS';&lt;/LI-CODE&gt;&lt;P&gt;...where srid returned 6)&lt;/P&gt;&lt;P&gt;Finally, I restarted Pro in order to clear the local cache, which allowed the application to correctly read the updated spatial reference.&lt;/P&gt;&lt;P&gt;Still not sure why the Register with Geodatabase was refusing to let me add a spatial reference in the tool pane. Oh well...&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jan 2026 19:42:17 GMT</pubDate>
    <dc:creator>MGAL</dc:creator>
    <dc:date>2026-01-27T19:42:17Z</dc:date>
    <item>
      <title>Unable to Add Spatial Reference to Database View</title>
      <link>https://community.esri.com/t5/data-management-questions/unable-to-add-spatial-reference-to-database-view/m-p/1679599#M45826</link>
      <description>&lt;P&gt;I'm trying to create a 1:M database view of land parcels to owners. My goal is to publish the result as a registered feature layer in Portal.&amp;nbsp;I am running Pro 3.6, accessing data from a SQL database, and publishing to Enterprise 11.5. In short, here was my original workflow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Run the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/create-database-view.htm" target="_blank" rel="noopener"&gt;Create Database Tool&lt;/A&gt;. Here's a truncated version of my View Definition:&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SELECT 
    t.OBJECTID, 
    t.SHAPE, 
    t.gistractnum,
    t.datasource,
    t.&amp;lt;some other fields...&amp;gt;,
    r.TRACTNUMBER,
    r.&amp;lt;some other fields...&amp;gt;
FROM DBA.Tracts_evw t
LEFT JOIN DBA.TRACTSDB r ON t.gistractnum = r.TRACTNUMBER&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;2. After this runs, I ran the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/register-with-geodatabase.htm" target="_blank" rel="noopener"&gt;Register With Geodatabase&lt;/A&gt; tool. For the OID &amp;amp; Shape parameters, I used the first two fields from the above query. Geometry type is polygon, and the coordinate system matches the Tracts dataset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. Publish new polygon feature class to Portal as a registered feature layer.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Currently, I am running into two issues (unsure if they're related, so I'm posting the two together)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1. At step 2, the GUI won't allow me to enter a Coordinate system. As you can see below, the spatial reference quickly disappears as soon as I select.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="GIF of projection parameter issue" style="width: 562px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/147190i541E5D7E6D97D23D/image-dimensions/562x290?v=v2" width="562" height="290" role="button" title="RegisterWithGeodatabase_ProjectionIssue.gif" alt="GIF of projection parameter issue" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;GIF of projection parameter issue&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried copying the python command &amp;amp; injecting the projection as an arcpy spatial reference object.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;albers = arcpy.SpatialReference(102003)
arcpy.management.RegisterWithGeodatabase(
    in_dataset=r"C:\Users\p\a\t\h.sde\dba.SpatialROWDB",
    in_object_id_field="OBJECTID",
    in_shape_field="SHAPE",
    in_geometry_type="POLYGON",
    in_spatial_reference=albers,
    in_extent=None
)&lt;/LI-CODE&gt;&lt;P&gt;Successful run, but the newly registered FC does not have a spatial reference.&amp;nbsp;The coordinate system is a custom reference, as I've read in &lt;A href="https://community.esri.com/t5/arcgis-enterprise-questions/unable-to-create-view-in-an-enterprise-geodatabase/td-p/1675889" target="_blank" rel="noopener"&gt;another post&lt;/A&gt; that custom projections for views can be problematic.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. After registering the view, the data published to Portal without issues. I can see all the data in the web map, and the fields/attributes appear to be correctly joined in the table (despite the fact that the parcels appear at the origin point of my PCS).&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when I open the table in Pro, I get the following error "Failed to load data - invalid partition".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MGAL_0-1769187357614.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/147191i9BAD8423C76295A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MGAL_0-1769187357614.png" alt="MGAL_0-1769187357614.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Again - unsure if the two are related, but figured I'd include.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hoping that OP &amp;amp; contributor&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/745900"&gt;@Thomas_Puthusserry&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/923685"&gt;@VenkataKondepati&lt;/a&gt;&amp;nbsp;from the linked post above might see this and could potentially provide some insight...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Mike&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jan 2026 17:06:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/unable-to-add-spatial-reference-to-database-view/m-p/1679599#M45826</guid>
      <dc:creator>MGAL</dc:creator>
      <dc:date>2026-01-23T17:06:41Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Add Spatial Reference to Database View</title>
      <link>https://community.esri.com/t5/data-management-questions/unable-to-add-spatial-reference-to-database-view/m-p/1679687#M45830</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/504926"&gt;@MGAL&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;The "Invalid Partition" error might occur because your 1:M join duplicates the OBJECTID, violating the requirement for every row in a registered feature class to have a unique ID.&lt;/P&gt;&lt;P&gt;You can fix this by either generate a truly unique ID in your view using ROW_NUMBER() or publish the data as a Feature Layer and Table linked by a Relationship Class instead of a SQL join.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jan 2026 20:17:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/unable-to-add-spatial-reference-to-database-view/m-p/1679687#M45830</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2026-01-23T20:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Add Spatial Reference to Database View</title>
      <link>https://community.esri.com/t5/data-management-questions/unable-to-add-spatial-reference-to-database-view/m-p/1680324#M45837</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/923685"&gt;@VenkataKondepati&lt;/a&gt;&amp;nbsp;this cleared up the partition issue. thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;fwiw, i needed to explicitly cast to INT, as the view tried to use bigint instead, which come to find out, is not supported by my SQL instance.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SELECT 
    CAST(ROW_NUMBER() OVER (ORDER BY t.OBJECTID) AS INT) AS RowID,
    t.OBJECTID AS TractsOID, &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I'm just getting done solving the projections issue, and I thought I'd share.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The core issue was a disconnect between the SQL database engine and the ESRI Geodatabase registry. To fix this, I performed a manual override of the layer's metadata system.&lt;/P&gt;&lt;P&gt;First, we created the view in SSMS and then registered it using geoprocessing tools in Pro (accepting the "Unknown" projection). Next, we ran a direct SQL update on the sde.SDE_layers system table to forcibly change the view's SRID from 0 to 6 (where 6 refers to the ID holding the spatial reference for my shape layer. I found this value by first querying the sde.SDE_layers table...&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SELECT layer_id, table_name, srid 
FROM sde.SDE_layers 
WHERE table_name = 'TRACTS';&lt;/LI-CODE&gt;&lt;P&gt;...where srid returned 6)&lt;/P&gt;&lt;P&gt;Finally, I restarted Pro in order to clear the local cache, which allowed the application to correctly read the updated spatial reference.&lt;/P&gt;&lt;P&gt;Still not sure why the Register with Geodatabase was refusing to let me add a spatial reference in the tool pane. Oh well...&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2026 19:42:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/unable-to-add-spatial-reference-to-database-view/m-p/1680324#M45837</guid>
      <dc:creator>MGAL</dc:creator>
      <dc:date>2026-01-27T19:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to Add Spatial Reference to Database View</title>
      <link>https://community.esri.com/t5/data-management-questions/unable-to-add-spatial-reference-to-database-view/m-p/1680327#M45838</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/504926"&gt;@MGAL&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;I am glad to know it worked and you are able to fix it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2026 19:42:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/unable-to-add-spatial-reference-to-database-view/m-p/1680327#M45838</guid>
      <dc:creator>VenkataKondepati</dc:creator>
      <dc:date>2026-01-27T19:42:52Z</dc:date>
    </item>
  </channel>
</rss>

