<?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: SDE - change field from REQUIRED to NON_REQUIRED in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/sde-change-field-from-required-to-non-required/m-p/47773#M2666</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The key to altering columns in a registered table is to repeat the procedure&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on the adds table and/or archive table.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Changing a NOT NULL column to NULLS ALLOWED should be quite simple, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and does not require column removal.&amp;nbsp; It certainly could wreck the geodatabase&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;metadata, so caution should always be exercised.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 May 2014 22:44:34 GMT</pubDate>
    <dc:creator>VinceAngelo</dc:creator>
    <dc:date>2014-05-19T22:44:34Z</dc:date>
    <item>
      <title>SDE - change field from REQUIRED to NON_REQUIRED</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-change-field-from-required-to-non-required/m-p/47771#M2664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;How can I deleted a "REQUIRED" field?&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm attempting to delete a field that I added thru a python script.&amp;nbsp; We (tech support and I) were able to track it down to my accidently adding it as "REQUIRED".&amp;nbsp;&amp;nbsp; (Bummer!)&amp;nbsp;&amp;nbsp; She's trying to track down the answer on that end, but I thought I would throw it out there to the user group in case anyone knows the trick to do this.&amp;nbsp; I'm assuming it will be a SQL-Manager hack.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried all the typical ArcCatalog/Map/toolbox methods, and the "replace field" tool in the "X-Ray to Geodatabases" addin with the the "required" box unselected.&amp;nbsp; The replace-tool did create the temp field, but then still failed with the&amp;nbsp; "ERROR 001334: Cannot delete required field &amp;lt;fieldname&amp;gt;".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is my "master" file (which I am doing maintenance one) with all the bells and whistles (versions, edit tracking, archiving, topology-rules, subtypes, domains, etc.) turned on, so I'm trying not to lose all that.&amp;nbsp; Worst case scenario is I lose the history etc (I'm assuming) and rebuild the subtypes/domains/rules and use the X-Ray tool to clean it all up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;Anyone know any tricks to get rid of the REQUIRED field without destroying my Geodatabase?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ArcSDE (SQL2008) 10.2.1.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any suggestions,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Becky&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 May 2014 17:03:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-change-field-from-required-to-non-required/m-p/47771#M2664</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2014-05-15T17:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: SDE - change field from REQUIRED to NON_REQUIRED</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-change-field-from-required-to-non-required/m-p/47772#M2665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;ANSWERED&lt;/STRONG&gt;&lt;SPAN&gt;.....I was not able to change the field from REQUIRED to not Required, but with the help of tech support (Thanks Melonie S), I was able to delete the field that was set to REQUIRED by using SQL Manager, which was my original intent. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This does not appear to have caused any issues with my GDB, although it MAY have turned off my versioning. I wanted to document the steps here for others.....but suggest testing on a copy of your database before attempting. That is, USE WITH CAUTION&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In SQL Manager:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]use yourGDBName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ALTER TABLE [dbo].[FcName] DROP COLUMN [fieldToDelete]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;delete from dbo.SDE_column_registry where table_name = FcName AND column_name = fieldToDelete[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dbo = the FC owner, and could be sde or another username&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FcName = name of the Feature Class or table that needs modifying&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;puntuation is as shown, with brackets needed, and no quotes anywhere. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I recommend making sure you dont have any domains or any other topology rules, etc. attached to the field before you delete.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 19:53:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-change-field-from-required-to-non-required/m-p/47772#M2665</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2014-05-19T19:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: SDE - change field from REQUIRED to NON_REQUIRED</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-change-field-from-required-to-non-required/m-p/47773#M2666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The key to altering columns in a registered table is to repeat the procedure&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on the adds table and/or archive table.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Changing a NOT NULL column to NULLS ALLOWED should be quite simple, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and does not require column removal.&amp;nbsp; It certainly could wreck the geodatabase&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;metadata, so caution should always be exercised.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 22:44:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-change-field-from-required-to-non-required/m-p/47773#M2666</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2014-05-19T22:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: SDE - change field from REQUIRED to NON_REQUIRED</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-change-field-from-required-to-non-required/m-p/47774#M2667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Vince,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In my case, it wasn't to allow NULLS or not, but actually "REQUIRED". I had that as a AddField argument in my arcpy script to update my domains. Most the time I ran it against a new FGDB that I delete/recreate on each update, so it was never an issue. I'm currently updating my MASTER sde database and ran the script, which then added the field to that. I decided I didn't want that field in the master and then couldn't delete it. That is when I looked at my script and saw my error...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; arcpy.AddField_management("master, "newField", "SHORT", 0, 0, 2, "anAlias","NULLABLE","REQUIRED")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good suggestions about looking at the archived tables and metadata for issues after the SQL commands I performed. Especially the metadata. That didn't dawn on my that is could mess with that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Besides not messing up my GDB topology/tracking/versioning/archiving, I was hoping to be able to keep the history intact, but I'm also wanting to reorder the fields (this is major overhaul of the master files), and I think the only way I can really do what I want is to use the "X-RAY" reorder tool which still wants to recreate the file (or errors out when trying to replace)..which mean the globals will be different and history may not follow forward anyway. But IF I am using the X-Ray option, I found the new file did not have the "REQUIRED" flag on the field in the new file and I could delete if in Catalog then, so I will have to mess with that approach. I'm also thinking of renaming the actual GDB too, and that also seems to be best with a replacement/rebuild. Anyway, just trying to retain as much history as posible, but those are diccussions beyond this thread. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your suggestions.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 15:02:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-change-field-from-required-to-non-required/m-p/47774#M2667</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2014-05-20T15:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: SDE - change field from REQUIRED to NON_REQUIRED</title>
      <link>https://community.esri.com/t5/data-management-questions/sde-change-field-from-required-to-non-required/m-p/47775#M2668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for posting this Rebecca it solved my "required" problem as well. As an added note I was able to execute your SQL statements using &lt;A href="http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#IWorkspace.htm"&gt;IWorkspace&lt;/A&gt;.ExecutesSQL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 23:23:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/sde-change-field-from-required-to-non-required/m-p/47775#M2668</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2016-10-07T23:23:18Z</dc:date>
    </item>
  </channel>
</rss>

