<?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 OBJECTID's assigned when appending to ArcSDE Database in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/objectid-s-assigned-when-appending-to-arcsde/m-p/60962#M3469</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am appending a set of records from a File Geodatabase to a non-versioned SDE feature dataset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone explain why the OBJECTID's assigned to these records by SDE are not sequential?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, the original SDE feature dataset has 139,661 features with OBJECTID's 1 - 139,661.&amp;nbsp; When I append 1,481 records from a File Geodatabase, SDE assigns OBJECTID's from 139,662 - 141,318 but with gaps between 139,664 - 139,841.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this something I should worry about?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Adam Tobin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 09 Dec 2011 12:29:30 GMT</pubDate>
    <dc:creator>AdamTobin</dc:creator>
    <dc:date>2011-12-09T12:29:30Z</dc:date>
    <item>
      <title>OBJECTID's assigned when appending to ArcSDE Database</title>
      <link>https://community.esri.com/t5/data-management-questions/objectid-s-assigned-when-appending-to-arcsde/m-p/60962#M3469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am appending a set of records from a File Geodatabase to a non-versioned SDE feature dataset.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone explain why the OBJECTID's assigned to these records by SDE are not sequential?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, the original SDE feature dataset has 139,661 features with OBJECTID's 1 - 139,661.&amp;nbsp; When I append 1,481 records from a File Geodatabase, SDE assigns OBJECTID's from 139,662 - 141,318 but with gaps between 139,664 - 139,841.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this something I should worry about?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Adam Tobin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2011 12:29:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/objectid-s-assigned-when-appending-to-arcsde/m-p/60962#M3469</guid>
      <dc:creator>AdamTobin</dc:creator>
      <dc:date>2011-12-09T12:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: OBJECTID's assigned when appending to ArcSDE Database</title>
      <link>https://community.esri.com/t5/data-management-questions/objectid-s-assigned-when-appending-to-arcsde/m-p/60963#M3470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Adam,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An objectID is a unique, not null integer column used to uniquely identify rows in tables in a geodatabase. ObjectIDs are limited to 32-bit values, which store a maximum value of 2,147,483,648.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcGIS/ArcSDE software will automatically append the ObjectID based on the next row id. In Your case, OBJECTID was maintained by SDE/Geodatabase, and your next row id (before appending the 1,481 rows) might be a number bigger than your total rows, like 139,841. That's why it appends after that number. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a quick example, that I have a table BUILDINGS (registration_id = 40) owned by GIS, and I am using SQL to insert a new ST_GEOMETRY feature. In this case, I need to run a stored procedure to get the right OBJECTID from the next row id. The next row id number might be far larger than my total existing features because I had deleted a lot of features from BUILDINGS before. Please keep in mind that the ObjectIDs would NOT be re-useable, and it will keep growing until you delete the whole feature class and re-create the feature class again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Example SQL code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;INSERT INTO GIS.BUILDINGS&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(objectid, fid, type, subtype, shape)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(sde.version_user_ddl.next_row_id('GIS', 40), &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;18907, 'BLD', 'RES', sde.st_geometry &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;('polygon (( 2219520.56768649 387051.66985716, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2219525.34823696 387079.52399077, 2219536.03133855 387077.71905252, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2219539.05578917 387095.47546386, 2219528.17754562 387097.32910505, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2219528.61661291 387099.81695550, 2219489.00622816 387106.54876471, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2219480.81097279 387058.40167483, 2219520.56768649 387051.66985716))', &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;17)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As long as you are using ArcGIS software dealing with the SDE feature class, you don't need to worry about the gaps between ObjectIDs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For your reference, here are some help documents relate with this topic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_is_an_objectID/006z00000009000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_is_an_objectID/006z00000009000000/&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Workflow_Using_SQL_with_existing_feature_classes/006z000000q7000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Workflow_Using_SQL_with_existing_feature_classes/006z000000q7000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Dec 2011 20:52:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/objectid-s-assigned-when-appending-to-arcsde/m-p/60963#M3470</guid>
      <dc:creator>BenLin</dc:creator>
      <dc:date>2011-12-15T20:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: OBJECTID's assigned when appending to ArcSDE Database</title>
      <link>https://community.esri.com/t5/data-management-questions/objectid-s-assigned-when-appending-to-arcsde/m-p/60964#M3471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ben,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your response has clarified the theory.&amp;nbsp; However, I'm still a little confused, as we have made no edits to the original SDE layer prior to the append so there is no obvious reason for the row_id to have incremented.&amp;nbsp; Also, the gaps occur randomly during the middle of a single append process, which I am running from ArcToolbox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you have any explanations as to why this might be?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Adam&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Dec 2011 09:55:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/objectid-s-assigned-when-appending-to-arcsde/m-p/60964#M3471</guid>
      <dc:creator>AdamTobin</dc:creator>
      <dc:date>2011-12-21T09:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: OBJECTID's assigned when appending to ArcSDE Database</title>
      <link>https://community.esri.com/t5/data-management-questions/objectid-s-assigned-when-appending-to-arcsde/m-p/60965#M3472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Adam,&lt;BR /&gt;&lt;BR /&gt;&amp;lt;snip&amp;gt;&lt;BR /&gt;&lt;BR /&gt;In this case, I need to run a stored procedure to get the right OBJECTID from the next row id. &lt;BR /&gt;&lt;BR /&gt;&amp;lt;snip&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Example SQL code:&lt;BR /&gt;INSERT INTO GIS.BUILDINGS&lt;BR /&gt;(objectid, fid, type, subtype, shape)&lt;BR /&gt;VALUES&lt;BR /&gt;(sde.version_user_ddl.next_row_id('GIS', 40), &lt;BR /&gt;18907, 'BLD', 'RES', sde.st_geometry &lt;BR /&gt;('polygon (( 2219520.56768649 387051.66985716, &lt;BR /&gt;2219525.34823696 387079.52399077, 2219536.03133855 387077.71905252, &lt;BR /&gt;2219539.05578917 387095.47546386, 2219528.17754562 387097.32910505, &lt;BR /&gt;2219528.61661291 387099.81695550, 2219489.00622816 387106.54876471, &lt;BR /&gt;2219480.81097279 387058.40167483, 2219520.56768649 387051.66985716))', &lt;BR /&gt;17)&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;As long as you are using ArcGIS software dealing with the SDE feature class, you don't need to worry about the gaps between ObjectIDs.&lt;BR /&gt;&lt;BR /&gt;For your reference, here are some help documents relate with this topic.&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_is_an_objectID/006z00000009000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/What_is_an_objectID/006z00000009000000/&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Workflow_Using_SQL_with_existing_feature_classes/006z000000q7000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Workflow_Using_SQL_with_existing_feature_classes/006z000000q7000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Ben&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Ben, this is exactly what I was looking for.&amp;nbsp; Also in case anyone else was wondering, the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Workflow_Using_SQL_with_existing_feature_classes/006z000000q7000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;referenced link&lt;/A&gt;&lt;SPAN&gt; has the SQL for how to get the registration_id from the table and owner names.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Additional question:&amp;nbsp; I'm using Oracle 10g (and eventually 11g) but the procedure "version_user_ddl.next_row_id" doesn't seem to exist.&amp;nbsp; If I run the command:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;exec sde.version_user_ddl.next_row_id('SDE', 50);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Oracle returns:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Error starting at line 13 in command:
exec sde.version_user_ddl.next_row_id('SDE', 50)
Error report:
ORA-06550: line 1, column 7:
PLS-00221: 'NEXT_ROW_ID' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
06550. 00000 -&amp;nbsp; "line %s, column %s:\n%s"
*Cause:&amp;nbsp;&amp;nbsp;&amp;nbsp; Usually a PL/SQL compilation error.
*Action:&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't see any like-named procedures in my SDE instance.&amp;nbsp; What should I be using for Oracle10g/11g?&amp;nbsp; Or is that a custom procedure?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:19:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/objectid-s-assigned-when-appending-to-arcsde/m-p/60965#M3472</guid>
      <dc:creator>ChrisBeaudette</dc:creator>
      <dc:date>2021-12-10T22:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: OBJECTID's assigned when appending to ArcSDE Database</title>
      <link>https://community.esri.com/t5/data-management-questions/objectid-s-assigned-when-appending-to-arcsde/m-p/60966#M3473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Adam,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok, we can double check the next sequence before we append any new data to the feature class first, like following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT R40.nextval from dual;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will give us the next objectid before we actually append any new rows to the feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You may also refer to the KB article regarding "HowTo:&amp;nbsp; Alter an ArcSDE row_id sequence in Oracle"&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/31437"&gt;http://support.esri.com/en/knowledgebase/techarticles/detail/31437&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jan 2012 22:20:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/objectid-s-assigned-when-appending-to-arcsde/m-p/60966#M3473</guid>
      <dc:creator>BenLin</dc:creator>
      <dc:date>2012-01-06T22:20:14Z</dc:date>
    </item>
  </channel>
</rss>

