FAQ: 为什么创建空间索引失败后索引会保留下来

文章编号 : 34060
软件: ArcSDE 9.2,9.3,9.3.1
操作系统: N/A
已邀请:

EsriSupport

赞同来自:

问题: 为什么创建空间索引失败后索引会保留下来?
回答:
如果创建st_geometry索引因为后台的数据库错误而创建失败的话,索引依旧存在但是其状态为非法。 为了在出现错误还能够创建成功,已经存在的非法索引必须被删除掉。 下面的例子描述了在sewer表上的shape字段创建sewer_shp_idx索引,创建会因为空间参考的原因创建失败,因为使用的st_srid=999不存在。 SQL> CREATE INDEX sewers_shp_idx ON sewers (shape)
2 INDEXTYPE IS sde.st_spatial_index
3 PARAMETERS ('st_grids=100 st_srid=999');
CREATE INDEX sewers_shp_idx ON sewers (shape)
*
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20083: Parameter ST_SRID 999 does not exist in ST_SPATIAL_REFERENCES table.
ORA-06512: at "SDE.SPX_UTIL", line 712
ORA-06512: at "SDE.ST_DOMAIN_METHODS", line 941
出现错误后,可以检查所以呢已经存在,但是其操作装态标记为失败,这说明索引是不可用的。

SQL> CREATE INDEX sewers_shp_idx ON sewers (shape)
2 INDEXTYPE IS sde.st_spatial_index
3 PARAMETERS ('st_grids=100 st_srid=999');
CREATE INDEX sewers_shp_idx ON sewers (shape)
*
ERROR at line 1:
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20083: Parameter ST_SRID 999 does not exist in ST_SPATIAL_REFERENCES table.
ORA-06512: at "SDE.SPX_UTIL", line 712
ORA-06512: at "SDE.ST_DOMAIN_METHODS", line 941
这是oracle的扩展在实施域索引的一个限制。Oracle的可扩展没有提供在出现错误的时候删除索引的功能。 因此这个现象并非只针对st_geometry和st_spaital_index。





创建时间:2007-11-14
最近更新: 2009-10-14


原文链接
http://support.esrichina.com.cn/2007/1114/850.html

要回复问题请先登录注册