<?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 change primary key in feature class. in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/unable-to-change-primary-key-in-feature-class/m-p/65740#M3779</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;'sdetable -o alter_reg -C' doesn't specify a primary key, it specifies the registered rowid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;column (which need not be a primary key, only NOT NULL, of SE_INT32_TYPE, and unique&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[repeatedly so, not from a dynamic row number]).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'sdetable -o describe' will report what type it thinks each column is, and will show the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;current registered rowid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I'm making non-trivial changes to tables, I usually fall back to my data creation scripts,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;modify them, and roll the table creation process forward from there.&amp;nbsp; I don't think I've&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ever deleted a column from a registered table.&amp;nbsp; I also avoid changing table structure &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;after a table has been registered with the geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Sep 2012 18:18:17 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2012-09-14T18:18:17Z</dc:date>
    <item>
      <title>Unable to change primary key in feature class.</title>
      <link>https://community.esri.com/t5/data-management-questions/unable-to-change-primary-key-in-feature-class/m-p/65739#M3778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;My setup: ArcSDE 9.3 ArcCatalog 10.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to change the primary key in a feature class from one field to another. I am using the following command which returns success. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;sdetable -o alter_reg -t &amp;lt;feature class table&amp;gt; -c &amp;lt;field to use for primary key&amp;gt; -C USER -u &amp;lt;username&amp;gt; -p &amp;lt;password&amp;gt; -i 5151&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, when i try to delete the field that was previously a primary key throws the error "one or more fields cannot be deleted". I am following the below steps to delete a field from feature class in arccatalog.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Open arccatalog. Locate feature class from connection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Right click properties.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Go to Fields tab.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Highlight the field and press delete key.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am suspecting one of the following reasons based on my limited knowledge. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Switching primary key did not happen despite the success message running the above command.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- I need to enforce the primary key change with a followup command, which i am not aware.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any thoughts would be helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Chan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 17:39:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/unable-to-change-primary-key-in-feature-class/m-p/65739#M3778</guid>
      <dc:creator>ChandraKrish</dc:creator>
      <dc:date>2012-09-14T17:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to change primary key in feature class.</title>
      <link>https://community.esri.com/t5/data-management-questions/unable-to-change-primary-key-in-feature-class/m-p/65740#M3779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;'sdetable -o alter_reg -C' doesn't specify a primary key, it specifies the registered rowid&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;column (which need not be a primary key, only NOT NULL, of SE_INT32_TYPE, and unique&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[repeatedly so, not from a dynamic row number]).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'sdetable -o describe' will report what type it thinks each column is, and will show the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;current registered rowid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I'm making non-trivial changes to tables, I usually fall back to my data creation scripts,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;modify them, and roll the table creation process forward from there.&amp;nbsp; I don't think I've&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ever deleted a column from a registered table.&amp;nbsp; I also avoid changing table structure &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;after a table has been registered with the geodatabase.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 18:18:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/unable-to-change-primary-key-in-feature-class/m-p/65740#M3779</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2012-09-14T18:18:17Z</dc:date>
    </item>
  </channel>
</rss>

