Select to view content in your preferred language

Table Appearing in SDE, but deleted from SQL Server

2846
2
Jump to solution
02-22-2021 03:48 PM
PeterTQFES
Occasional Contributor

We have tables appearing within ArcGIS Pro, SDE connection that no longer exist within the SQL Server connection.  

Deleting the tables while in ArcGIS Pro removes them, but when we refresh the connection they are still there.

I suspect there was an issue when copying up these large tables and they were deleted from the SQL Server connection, but left registered in SDE.

Is there any way we can clear those tables from SDE?   

The SQL Server is an AWS RDS and we might getting some mirroring causing the problem.

Thanks

Peter T, Brisbane
0 Kudos
1 Solution

Accepted Solutions
VishApte
Esri Contributor

It looks like tables were dropped directly in SQL Server. When a table is dropped using ArcGIS Pro or Catalog, it deletes lot of metadata entries, typically, GDB_ITEMS, SDE_TABLE_REGISTRY, SDE_COLUMN_REGISTRY, "a" and "d" tables for versioning etc.

If possible, try to create the table again with same structure using SQL statement and then delete the table using ArcGIS Catalog. Hopefully, Catalog will complete the workflow of table deletion without a rollback due to the missing table.

If you simply want these tables not appear in dataset tree, then delete the corresponding entries from SDE_TABLE_REGISTRY and GDB_ITEMS. See https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/overview-geodatabase-sys...

and https://desktop.arcgis.com/en/arcmap/10.4/manage-data/geodatabases/registering-a-table-with-the-geod... for some info.

NOTE: manual edits to metadata tables is a not recommended and can corrupt entire EGDB. So, take a backup before attempting anything. 

Cheers,

Vish

View solution in original post

2 Replies
VishApte
Esri Contributor

It looks like tables were dropped directly in SQL Server. When a table is dropped using ArcGIS Pro or Catalog, it deletes lot of metadata entries, typically, GDB_ITEMS, SDE_TABLE_REGISTRY, SDE_COLUMN_REGISTRY, "a" and "d" tables for versioning etc.

If possible, try to create the table again with same structure using SQL statement and then delete the table using ArcGIS Catalog. Hopefully, Catalog will complete the workflow of table deletion without a rollback due to the missing table.

If you simply want these tables not appear in dataset tree, then delete the corresponding entries from SDE_TABLE_REGISTRY and GDB_ITEMS. See https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/overview-geodatabase-sys...

and https://desktop.arcgis.com/en/arcmap/10.4/manage-data/geodatabases/registering-a-table-with-the-geod... for some info.

NOTE: manual edits to metadata tables is a not recommended and can corrupt entire EGDB. So, take a backup before attempting anything. 

Cheers,

Vish

PeterTQFES
Occasional Contributor

Thanks Vish.  That worked, recreating the tables with sql create table.   In the end didn't use exact schema, just used OBJECTID and another dummy nvarchar.   Seems to cleared both SDE and any references in the SDE tables.

Peter T, Brisbane
0 Kudos