Select to view content in your preferred language

Feature Dataset do not delete (SDE)

4182
14
05-10-2011 05:03 AM
DavidAlvarez
Emerging Contributor
I have three feature datasets in an SDE (version 10) that i can not delete. They were tie to an old database that do not exist any more. I am using Multiple DB on one SQL instance. 

Any suggestion on how I can delete those feature datasets?

Thank you,

David
0 Kudos
14 Replies
DavidAlvarez
Emerging Contributor
I can not connect to the TroutCreek database. DB does not exist.
0 Kudos
JakeSkinner
Esri Esteemed Contributor
You can delete the empty feature datasets within SQL Server Management Studio.  Before doing so be sure to make a database backup of your SDE geodatabase.  After the backup is created you can run the following query:

use SDE
delete from sde.GDB_ITEMS where Name = 'TroutCreek.DBO.Model'
0 Kudos
DavidAlvarez
Emerging Contributor
Hi Jake,

Thank you, I was able to delete the feature datasets. They do not appear any more when i log-in using ArcCatalog.

When I was checking the SDE.GDB.ITEMS, I Notice that the records for the features classes that were inside the feature datasets.  When I try to delete them i get the following error.

A problem occurred attempting to delete row 3.
Error Source: Microsoft.SqlServer.managemnet.Data
........  "sde.sys.geometry" is invalid

(See attach graph)
0 Kudos
JakeSkinner
Esri Esteemed Contributor
It appears that the feature datasets were not empty.  Deleting table entries within SQL Server Management Studio is a last resort.  When it comes to feature classes, there are a slew of other table entries/tables that need to be deleted as well.

Attempting to delete other table entries can seriously corrupt your database.  I would recommend restoring your database backup and contacting tech support.  They will be able to determine why the feature datasets are still existing even though the database has been deleted.

Also, I would recommend using a single geodatabase model in the future.  I find they are much easier to maintain.
0 Kudos
sreeharinair
New Contributor
check the following tables and if there is any entry belongs to the deleted table/layer/dataset then remove those.

select * from sde_object_locks
select * from sde_object_ids
select * from sde_table_locks
select * from sde_table_registry
select * from sde_layers
select * from sde_layer_locks
select * from sde_layer_stats
select * from sde_column_registry
select * from sde_geometry_columns
select name from GDB_ITEMS
0 Kudos