HOW TO
Often after deletion of complex data models like geometric network, trace network, parcel fabric, or utility network from ArcGIS client applications (ArcGIS Pro/ArcMap) under a specific schema, we could still observe the associated system tables related and entries in the geodatabase core system tables from the RDBMS application. This means that the deletion of the data was incomplete. This might be because of application crash operations in the ArcGIS client while performing deletion or for various race conditions and system issues in client machines.
In that scenario, we would have to manually remove those from RDBMS and also their entries from the geodatabase core system tables.
Note:
select * from dbo.GDB_ITEMS where name like '%<schema_name> %'; select * from dbo.SDE_TABLE_REGISTRY where owner like '%<schema_name>%'; select * from dbo.SDE_COLUMN_REGISTRY where owner like '%<schema_name>%'; select * from dbo.SDE_LAYERS where owner like '%<schema_name> %'; select * from dbo.SDE_GEOMETRY_COLUMNS where f_table_schema like '%<schema_name> %';
Delete from dbo.GDB_ITEMS where name like '%<schema_name> %'; Delete from dbo.SDE_TABLE_REGISTRY where owner like '%<schema_name>%'; Delete from dbo.SDE_COLUMN_REGISTRY where owner like '%<schema_name>%'; Delete from dbo.SDE_LAYERS where owner like '%<schema_name> %'; Delete from dbo.SDE_GEOMETRY_COLUMNS where f_table_schema like '%<schema_name> %';
DECLARE @sql nvarchar(max) = '';
SELECT @sql = @sql + 'DROP TABLE<schema_name>.' + QUOTENAME(t.name) + ';'
FROM sys.tables t
WHERE t.type = 'U' AND t.schema_id = SCHEMA_ID('<schema_name>');
EXEC sp_executesql @sql;
Article ID: 000037986
Get help from ArcGIS experts
Start chatting now