<?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: Error message says can't access deleted FC in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/error-message-says-can-t-access-deleted-fc/m-p/112750#M6467</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It sounds to me like something didn't get deleted fully/correctly.&amp;nbsp; It is possible that you can manually hack the database to resolve the issue, but it's dangerous and certainly not supported by Esri.&amp;nbsp; Since this isn't for the faint of heart, proceed with caution if this really ends up being your problem to begin with.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure which spatial data type you're using, but you may have some lingering delta tables (A and D) and potentially the features and spatial tables (F and S tables) as well.&amp;nbsp; Additionally, you likely have some lingering references to the partially-deleted feature class within your &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//002q00000080000000" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcSDE system tables&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make a backup of your database first, then try the steps below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;BTW, I apologize but these queries are written for Oracle but they can be slightly modified to fit your SQL Server environment depending on your schema (DBO vs SDE).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First, find out the names of the A, D, S, and F tables for your deleted versioned feature class.&amp;nbsp; To do this, run the query below and scroll down in the result set in order to your feature class to identify the right table names:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;select
substr(l.TABLE_NAME,1,30) table_name,
substr('F'||layer_id,1,10) feature_table,
substr('S'||layer_id,1,10) spatial_table,
substr('A'||registration_id,1,10) adds_table,
substr('D'||registration_id,1,10) deletes_table,
substr(l.OWNER,1,12) owner
from&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sde.layers l, sde.table_registry r
where&amp;nbsp;&amp;nbsp;&amp;nbsp; l.owner NOT IN ('SDE')
and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l.table_name = r.table_name (+)
and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l.owner&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = r.owner (+)
order by owner, table_name&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second, delete the A and D tables (as well as the S and F tables if you were not using a spatial data type like ST_Geometry) for the feature class you intended to delete (if they still exist).&amp;nbsp; In other words, use SQL Server Management Studio to delete the tables from the database entirely that were provided from the query above.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Third, (this is where it can get tricky) you will need to make sure there isn't a reference to it in the SDE Layers and Table Registry tables within the ArcSDE system tables.&amp;nbsp; Try something like this (substitute your feature class name for 'deleted_ feature_class'):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;DELETE FROM DBO.GDB_ITEMS WHERE NAME = 'deleted_feature_class';
DELETE FROM DBO.GDB_TABLES_LAST_MODIFIED WHERE TABLE_NAME = 'deleted_feature_class';
DELETE FROM DBO.SDE_column_registry WHERE TABLE_NAME = 'deleted_feature_class';
DELETE FROM DBO.SDE_layers WHERE TABLE_NAME = 'deleted_feature_class';
DELETE FROM DBO.SDE_table_registry WHERE TABLE_NAME = 'deleted_feature_class';
DELETE FROM DBO.SDE_tables_modified WHERE TABLE_NAME = 'deleted_feature_class';
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can really hose up your geodatabase if you're not careful (hence, taking the backup from earlier), so be careful with the SQL above.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Fourth, try to re-register your dataset as versioned.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an alternative to all of the steps above, you &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;could&lt;/SPAN&gt;&lt;SPAN&gt; try unversioning the entire dataset and then try to version it again.&amp;nbsp; I doubt that will help but it might be worth a shot.&amp;nbsp; Good luck.&amp;nbsp; Post back to let us know the results.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 06:44:13 GMT</pubDate>
    <dc:creator>WilliamCraft</dc:creator>
    <dc:date>2021-12-11T06:44:13Z</dc:date>
    <item>
      <title>Error message says can't access deleted FC</title>
      <link>https://community.esri.com/t5/data-management-questions/error-message-says-can-t-access-deleted-fc/m-p/112749#M6466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm using ArcGIS 10.1, SDE is on SQL Server.&amp;nbsp; I've deleted a FC from a FD.&amp;nbsp; Since then I've added new FCs to the FD.&amp;nbsp; When I go to enable versioning on the FD, I get an error message that says versioning failed because it can't find the deleted FC.&amp;nbsp; Why does this happen?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 19:54:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-message-says-can-t-access-deleted-fc/m-p/112749#M6466</guid>
      <dc:creator>LenDesson</dc:creator>
      <dc:date>2014-04-18T19:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error message says can't access deleted FC</title>
      <link>https://community.esri.com/t5/data-management-questions/error-message-says-can-t-access-deleted-fc/m-p/112750#M6467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It sounds to me like something didn't get deleted fully/correctly.&amp;nbsp; It is possible that you can manually hack the database to resolve the issue, but it's dangerous and certainly not supported by Esri.&amp;nbsp; Since this isn't for the faint of heart, proceed with caution if this really ends up being your problem to begin with.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure which spatial data type you're using, but you may have some lingering delta tables (A and D) and potentially the features and spatial tables (F and S tables) as well.&amp;nbsp; Additionally, you likely have some lingering references to the partially-deleted feature class within your &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//002q00000080000000" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcSDE system tables&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make a backup of your database first, then try the steps below:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style:italic;"&gt;BTW, I apologize but these queries are written for Oracle but they can be slightly modified to fit your SQL Server environment depending on your schema (DBO vs SDE).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First, find out the names of the A, D, S, and F tables for your deleted versioned feature class.&amp;nbsp; To do this, run the query below and scroll down in the result set in order to your feature class to identify the right table names:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;select
substr(l.TABLE_NAME,1,30) table_name,
substr('F'||layer_id,1,10) feature_table,
substr('S'||layer_id,1,10) spatial_table,
substr('A'||registration_id,1,10) adds_table,
substr('D'||registration_id,1,10) deletes_table,
substr(l.OWNER,1,12) owner
from&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sde.layers l, sde.table_registry r
where&amp;nbsp;&amp;nbsp;&amp;nbsp; l.owner NOT IN ('SDE')
and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l.table_name = r.table_name (+)
and&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l.owner&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = r.owner (+)
order by owner, table_name&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Second, delete the A and D tables (as well as the S and F tables if you were not using a spatial data type like ST_Geometry) for the feature class you intended to delete (if they still exist).&amp;nbsp; In other words, use SQL Server Management Studio to delete the tables from the database entirely that were provided from the query above.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Third, (this is where it can get tricky) you will need to make sure there isn't a reference to it in the SDE Layers and Table Registry tables within the ArcSDE system tables.&amp;nbsp; Try something like this (substitute your feature class name for 'deleted_ feature_class'):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;DELETE FROM DBO.GDB_ITEMS WHERE NAME = 'deleted_feature_class';
DELETE FROM DBO.GDB_TABLES_LAST_MODIFIED WHERE TABLE_NAME = 'deleted_feature_class';
DELETE FROM DBO.SDE_column_registry WHERE TABLE_NAME = 'deleted_feature_class';
DELETE FROM DBO.SDE_layers WHERE TABLE_NAME = 'deleted_feature_class';
DELETE FROM DBO.SDE_table_registry WHERE TABLE_NAME = 'deleted_feature_class';
DELETE FROM DBO.SDE_tables_modified WHERE TABLE_NAME = 'deleted_feature_class';
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can really hose up your geodatabase if you're not careful (hence, taking the backup from earlier), so be careful with the SQL above.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Fourth, try to re-register your dataset as versioned.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As an alternative to all of the steps above, you &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;could&lt;/SPAN&gt;&lt;SPAN&gt; try unversioning the entire dataset and then try to version it again.&amp;nbsp; I doubt that will help but it might be worth a shot.&amp;nbsp; Good luck.&amp;nbsp; Post back to let us know the results.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:44:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/error-message-says-can-t-access-deleted-fc/m-p/112750#M6467</guid>
      <dc:creator>WilliamCraft</dc:creator>
      <dc:date>2021-12-11T06:44:13Z</dc:date>
    </item>
  </channel>
</rss>

