English

How To: Remove orphaned objects (feature classes) from a geodatabase

Summary

In the event of data or users being removed from a back-end database, geodatabase objects are sometimes orphaned. The most likely causes for this are:

· The objects were unintentionally dropped by a user with a SQL command.
· During database migration, the geodatabase objects were lost.

Procedure

The instructions provided describe how to remove an orphaned object from a geodatabase.

  1. Use 'sdetable -o delete' as the data owner to delete the orphaned table:

    Code:
    sdetable -o delete -t <orphaned_table_name> [-s <server_name>]
    [-i {<service> | <port#> | <direct connection>}]
    [-D <database_name>] -u <DB_user_name>
    [-p <DB_user_password>] [-N] [-q]

  2. In the back-end database, use SQL to create a table with the same name as the orphaned object.

    Code:
    CREATE TABLE <orphaned_table_name>
    (
    column_name1 data_type,
    column_name2 data_type,
    column_name3 data_type,
    ....
    )

  3. Use ArcCatalog to delete <orphaned_table_name>.
  4. To add the feature class back in to the geodatabase, create the feature class in ArcCatalog with the same name.

Related Information