<?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 ROWID can not be inserted due to duplicate in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/rowid-can-not-be-inserted-due-to-duplicate/m-p/1562514#M41057</link>
    <description>&lt;P&gt;I have these error and I am willing to fix it by setting the rowid value to its maximum+1. These errors happen when I try to add an attachment photo as attachment:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;FONT color="#000000"&gt; Error: Underlying DBMS error [ERROR: duplicate key value violates unique constraint "&lt;STRONG&gt;r83_sde_rowid_uk&lt;/STRONG&gt;" DETAIL: Key (attachmentid)=(&lt;STRONG&gt;801&lt;/STRONG&gt;) already exists. (akt_survey.akt_gis.sur_property__attach)::SQLSTATE=23505] [Survey_Property__ATTACH].&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;FONT size="2" color="#000000"&gt;&amp;nbsp;Error: Underlying DBMS error [ERROR: duplicate key value violates unique constraint "&lt;STRONG&gt;r83_sde_rowid_uk&lt;/STRONG&gt;" DETAIL: Key (attachmentid)=(&lt;STRONG&gt;1201&lt;/STRONG&gt;) already exists. (akt_survey.akt_gis.sur_property__attach)::SQLSTATE=23505] [Survey_Property__ATTACH].&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2" color="#000000"&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2" color="#000000"&gt;&lt;SPAN&gt;Error: Underlying DBMS error [ERROR: duplicate key value violates unique constraint "&lt;STRONG&gt;r83_sde_rowid_uk&lt;/STRONG&gt;" DETAIL: Key (attachmentid)=(&lt;STRONG&gt;1202&lt;/STRONG&gt;) already exists. (akt_survey.akt_gis.sur_property__attach)::SQLSTATE=23505] [Survey_Property__ATTACH]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;what happened before was:&lt;/DIV&gt;&lt;DIV&gt;1. I have polygon that already contains attachment, namely OLDPOLY&lt;/DIV&gt;&lt;DIV&gt;2. Convert these polygon into point using Feature to Point. I name this FC as NEWPOINT&lt;/DIV&gt;&lt;DIV&gt;3. Enable attachment on this NEWPOINT&lt;/DIV&gt;&lt;DIV&gt;4. Load all attachment using sql query from OLDPOLY to NEWPOINT: Insert Into NEWPOINT select * from OLDPOLY&lt;/DIV&gt;&lt;DIV&gt;5. Publish this NEWPOINT as feature service and create apps using FieldMap&lt;/DIV&gt;&lt;DIV&gt;6. Begin updating data. I take a new picture and try to upload it. Then those errors come up.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="4"&gt;I do a query "&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;&lt;FONT color="#000000"&gt;select max(attachmentid) from sur_property__attach&lt;/FONT&gt;"&lt;/FONT&gt; .&amp;nbsp;&lt;/STRONG&gt;&lt;FONT size="4" color="#000000"&gt;It says 300800.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It seems that the sequence needs to be moved to the maximum value of current attachmentid (300800) + 1.&lt;/DIV&gt;&lt;DIV&gt;How can I solve this problem ? How to find that "&lt;FONT size="2" color="#000000"&gt;&lt;STRONG&gt;r83_sde_rowid_uk&lt;/STRONG&gt;&lt;/FONT&gt;" ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;i am using Postgresql geodatabase&lt;/DIV&gt;</description>
    <pubDate>Tue, 26 Nov 2024 03:50:11 GMT</pubDate>
    <dc:creator>yockee</dc:creator>
    <dc:date>2024-11-26T03:50:11Z</dc:date>
    <item>
      <title>ROWID can not be inserted due to duplicate</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/rowid-can-not-be-inserted-due-to-duplicate/m-p/1562514#M41057</link>
      <description>&lt;P&gt;I have these error and I am willing to fix it by setting the rowid value to its maximum+1. These errors happen when I try to add an attachment photo as attachment:&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;FONT color="#000000"&gt; Error: Underlying DBMS error [ERROR: duplicate key value violates unique constraint "&lt;STRONG&gt;r83_sde_rowid_uk&lt;/STRONG&gt;" DETAIL: Key (attachmentid)=(&lt;STRONG&gt;801&lt;/STRONG&gt;) already exists. (akt_survey.akt_gis.sur_property__attach)::SQLSTATE=23505] [Survey_Property__ATTACH].&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;FONT size="2" color="#000000"&gt;&amp;nbsp;Error: Underlying DBMS error [ERROR: duplicate key value violates unique constraint "&lt;STRONG&gt;r83_sde_rowid_uk&lt;/STRONG&gt;" DETAIL: Key (attachmentid)=(&lt;STRONG&gt;1201&lt;/STRONG&gt;) already exists. (akt_survey.akt_gis.sur_property__attach)::SQLSTATE=23505] [Survey_Property__ATTACH].&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2" color="#000000"&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2" color="#000000"&gt;&lt;SPAN&gt;Error: Underlying DBMS error [ERROR: duplicate key value violates unique constraint "&lt;STRONG&gt;r83_sde_rowid_uk&lt;/STRONG&gt;" DETAIL: Key (attachmentid)=(&lt;STRONG&gt;1202&lt;/STRONG&gt;) already exists. (akt_survey.akt_gis.sur_property__attach)::SQLSTATE=23505] [Survey_Property__ATTACH]&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;what happened before was:&lt;/DIV&gt;&lt;DIV&gt;1. I have polygon that already contains attachment, namely OLDPOLY&lt;/DIV&gt;&lt;DIV&gt;2. Convert these polygon into point using Feature to Point. I name this FC as NEWPOINT&lt;/DIV&gt;&lt;DIV&gt;3. Enable attachment on this NEWPOINT&lt;/DIV&gt;&lt;DIV&gt;4. Load all attachment using sql query from OLDPOLY to NEWPOINT: Insert Into NEWPOINT select * from OLDPOLY&lt;/DIV&gt;&lt;DIV&gt;5. Publish this NEWPOINT as feature service and create apps using FieldMap&lt;/DIV&gt;&lt;DIV&gt;6. Begin updating data. I take a new picture and try to upload it. Then those errors come up.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="4"&gt;I do a query "&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;&lt;FONT size="4"&gt;&lt;FONT color="#000000"&gt;select max(attachmentid) from sur_property__attach&lt;/FONT&gt;"&lt;/FONT&gt; .&amp;nbsp;&lt;/STRONG&gt;&lt;FONT size="4" color="#000000"&gt;It says 300800.&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It seems that the sequence needs to be moved to the maximum value of current attachmentid (300800) + 1.&lt;/DIV&gt;&lt;DIV&gt;How can I solve this problem ? How to find that "&lt;FONT size="2" color="#000000"&gt;&lt;STRONG&gt;r83_sde_rowid_uk&lt;/STRONG&gt;&lt;/FONT&gt;" ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;i am using Postgresql geodatabase&lt;/DIV&gt;</description>
      <pubDate>Tue, 26 Nov 2024 03:50:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/rowid-can-not-be-inserted-due-to-duplicate/m-p/1562514#M41057</guid>
      <dc:creator>yockee</dc:creator>
      <dc:date>2024-11-26T03:50:11Z</dc:date>
    </item>
  </channel>
</rss>

