<?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: Can't delete raster FC from gdb in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/can-t-delete-raster-fc-from-gdb/m-p/555589#M31486</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Quinn,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What version of SDE are you using?&amp;nbsp; You may have to delete the raster dataset manually by executing some queries in SQL Server Management.&amp;nbsp; Before doing so, &lt;/SPAN&gt;&lt;STRONG&gt;be sure to create a database backup&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp; Here are the queries that will remove the raster dataset from an SDE 10.x geodatabase:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;select rastercolumn_id from sde.sde_raster_columns where table_name = '[table_name]' 

select layer_id from sde.sde_layers where table_name = '[table_name]' 

--Recall the two numbers from these queries. Then run the following queries:


delete from sde.GDB_ITEMS where Name = '&amp;lt;datbase&amp;gt;.&amp;lt;owner&amp;gt;.[table_name]' 

delete from sde.sde_table_registry where table_name = '[table_name]' 

delete from sde.sde_layers where table_name = '[table_name]' 

delete from sde.sde_raster_columns where table_name = '[table_name]' 

delete from sde.sde_geometry_columns where f_table_name = '[table_name]' 

DROP TABLE &amp;lt;owner&amp;gt;.[table_name]

DROP TABLE &amp;lt;owner&amp;gt;.sde_aux_&amp;lt;# from above rastercolumn_id query&amp;gt; 

DROP TABLE &amp;lt;owner&amp;gt;.sde_bnd_&amp;lt;#&amp;gt; 

DROP TABLE &amp;lt;owner&amp;gt;.sde_blk_&amp;lt;#&amp;gt; 

DROP TABLE &amp;lt;owner&amp;gt;.sde_ras_&amp;lt;#&amp;gt; 

DROP TABLE &amp;lt;owner&amp;gt;.f[number from above sde_layers query] 

DROP TABLE &amp;lt;owner&amp;gt;.s[number from above sde_layers query] &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:00:16 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2021-12-12T00:00:16Z</dc:date>
    <item>
      <title>Can't delete raster FC from gdb</title>
      <link>https://community.esri.com/t5/data-management-questions/can-t-delete-raster-fc-from-gdb/m-p/555587#M31484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a raster FC in a SQL server based GDB that I can't delete. It haust be corrupt because it says that the raster data set is not valid and I cannot delete the raster.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the best way to do that?&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;Quinn&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 12:52:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/can-t-delete-raster-fc-from-gdb/m-p/555587#M31484</guid>
      <dc:creator>QuinnMcCarthy</dc:creator>
      <dc:date>2013-07-29T12:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can't delete raster FC from gdb</title>
      <link>https://community.esri.com/t5/data-management-questions/can-t-delete-raster-fc-from-gdb/m-p/555588#M31485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Copy the valid data out of the FGDB, then delete the original directory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[Doh!&amp;nbsp; I saw "GDB" and somehow came up with "FGDB".&amp;nbsp; It's rare that you can mess&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;up an ArcSDE raster so badly that ArcGIS won't read it.&amp;nbsp; Jake's instructions below&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;should delete it completely, but you can also try the halfway solution of just removing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the GDB_ITEMS entry and trying to re-register it with the geodatabase.&amp;nbsp; Coordination&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;with Tech Support on this sort of failure is generally a good idea, mostly because this&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sort of error is so rare, Esri ought to know about it.&amp;nbsp; BTW, the supported way to delete&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a raster from a database is also to salvage what you can into a new database.]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jul 2013 13:29:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/can-t-delete-raster-fc-from-gdb/m-p/555588#M31485</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-07-29T13:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can't delete raster FC from gdb</title>
      <link>https://community.esri.com/t5/data-management-questions/can-t-delete-raster-fc-from-gdb/m-p/555589#M31486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Quinn,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What version of SDE are you using?&amp;nbsp; You may have to delete the raster dataset manually by executing some queries in SQL Server Management.&amp;nbsp; Before doing so, &lt;/SPAN&gt;&lt;STRONG&gt;be sure to create a database backup&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp; Here are the queries that will remove the raster dataset from an SDE 10.x geodatabase:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;select rastercolumn_id from sde.sde_raster_columns where table_name = '[table_name]' 

select layer_id from sde.sde_layers where table_name = '[table_name]' 

--Recall the two numbers from these queries. Then run the following queries:


delete from sde.GDB_ITEMS where Name = '&amp;lt;datbase&amp;gt;.&amp;lt;owner&amp;gt;.[table_name]' 

delete from sde.sde_table_registry where table_name = '[table_name]' 

delete from sde.sde_layers where table_name = '[table_name]' 

delete from sde.sde_raster_columns where table_name = '[table_name]' 

delete from sde.sde_geometry_columns where f_table_name = '[table_name]' 

DROP TABLE &amp;lt;owner&amp;gt;.[table_name]

DROP TABLE &amp;lt;owner&amp;gt;.sde_aux_&amp;lt;# from above rastercolumn_id query&amp;gt; 

DROP TABLE &amp;lt;owner&amp;gt;.sde_bnd_&amp;lt;#&amp;gt; 

DROP TABLE &amp;lt;owner&amp;gt;.sde_blk_&amp;lt;#&amp;gt; 

DROP TABLE &amp;lt;owner&amp;gt;.sde_ras_&amp;lt;#&amp;gt; 

DROP TABLE &amp;lt;owner&amp;gt;.f[number from above sde_layers query] 

DROP TABLE &amp;lt;owner&amp;gt;.s[number from above sde_layers query] &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:00:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/can-t-delete-raster-fc-from-gdb/m-p/555589#M31486</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-12T00:00:16Z</dc:date>
    </item>
  </channel>
</rss>

