Error: Failed to create feature class. Table already registered

Error Message
Attempts to create a new feature class or table in an ArcSDE geodatabase may result in this error: 

"Failed to create feature class. Table already registered[Error executing stored procedure sde.registry_util.insert_registration::ORA-20218:Registration <id> already exists.][<username>.<feature class name>]"

 

Cause
Each feature class or table that is registered with ArcSDE is assigned a unique value in the REGISTRATION_ID column of the SDE.TABLE_REGISTRY table. This column has a primary key constraint that prevents the same ID from being applied to multiple tables or feature classes. In rare circumstances, ArcSDE may assign IDs that are already taken. This is the immediate cause of the error.

 

Solution or Workaround
The values for the REGISTRATION_ID column of the SDE.TABLE_REGISTRY table are generated by a sequence. The solution is to manually advance the sequence to a value that is higher than the current maximum value in the column. 


  1. Connect to the database as the owner of the ArcSDE repository tables. 

    Determine the next value to be supplied by the sequence:
    SQL>SELECT last_number FROM user_sequences WHERE sequence_name = 'TABLE_ID_GENERATOR'; 
    
    

    Result for this example: 

    LAST_NUMBER 
    --------------- 
    48
  2. Determine the maximum value in the ID column of GDB_OBJECTCLASSES:
    SQL>SELECT MAX(registration_id) FROM TABLE_REGISTRY;
    
    

    Result for this example: 

    MAX(ID) 
    ------------ 
    49 

    In this example, The next ID that is provided by the sequence is 48. The ID is generated by the sequence increment by adding one. Since the highest ID in TABLE_REGISTRY is currently 49 presume that 48 is already taken. Therefore ArcSDE assigns an existing ID to any new feature classes or tables. This violates the unique constraint on the REGISTRATION_ID column, resulting in the error.
  3. In this example, the sequence needs to be advanced by two. Therefore we run the following SQL statement twice: 

    SQL>SELECT TABLE_ID_GENERATOR.NEXTVAL from dual; 
    
    

    Result for this example: 

    NEXTVAL 
    ---------- 
    48 

    SQL>SELECT TABLE_ID_GENERATOR.NEXTVAL from dual; 
    
    

    NEXTVAL 
    ---------- 
    49
  4. Confirm that the sequence has advanced by two by running the SQL statement from step 1 again: 

    SQL>SELECT last_number FROM user_sequences WHERE sequence_name = 'TABLE_ID_GENERATOR'; 
    
    

    Result for this example: 

    LAST_NUMBER 
    --------------- 
    50 

    The ID to be assigned to the next table or feature class in this example is now 50. Since this is higher than the current maximum REGISTRATION_ID value in TABLE_REGISTRY, there is no longer any possibility that the unique constraint will be violated. 

    Create new feature classes and tables in ArcSDE.

 

Related Information

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值