在使用Oracle数据泵来进行ArcSDE数据的逻辑迁移时,有时候会报如下错误:
C:\>impdp map/map tables=buildings directory=exp_imp_dir dumpfile=buildings.dmp
Import: Release 10.2.0.2.0 - Production on Tuesday, 22 January, 2008 16:38:00
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Master table "MAP"."SYS_IMPORT_TABLE_01" successfully loaded/unloaded
Starting "MAP"."SYS_IMPORT_TABLE_01": map/******** tables=buildings directory=exp_imp_dir dumpfile=buildings.dmp
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "MAP"."BUILDINGS" 1.005 MB 3149 rows
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/INDEX/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/TABLE_DATA
. . imported "MAP"."S1_IDX{1}quot; 157.5 KB 4205 rows
Processing object type TABLE_EXPORT/TABLE/INDEX/DOMAIN_INDEX/INDEX
ORA-39083: Object type INDEX failed to create with error:
ORA-20091: Import SRID does not match ST_Spatial_References SRID
Failing sql is:
BEGIN
SDE.st_type_export.validate_spref(1,-1196.334263,-1028.576111,1000000,0,1,0,1,4267);COMMIT; END;
Job "MAP"."SYS_IMPORT_TABLE_01" completed with 1 error(s) at 16:38:04提示用户导入的空间投影信息SRID与系统的SRID不一致。
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
. . imported "MAP"."BUILDINGS" 1.005 MB 3149 rows
Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/INDEX/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/TABLE_DATA
. . imported "MAP"."S1_IDX{1}quot;
SQL> DROP TABLE s1_idx$;
Table dropped.SQL> SELECT srid, sr_name FROM sde.st_spatial_references
2 WHERE sr_name = 'NAD_1983_StatePlane_Ohio_South_FIPS_3402_Feet';
SRID SR_NAME
---------- -----------------------------------------------
65 NAD_1983_StatePlane_Ohio_South_FIPS_3402_Feet因为我们每一个以ST_Geometry存储的属性表在查看数据库都会有一个SRID,而且我们已经将新的投影信息注册到我们导入的新库中,所以我们需要更新一下出错的那张表所有记录的SRID
SQL> UPDATE buildings t SET t.shape.srid = 65;
3149 rows updated.
SQL> COMMIT;SQL> CREATE INDEX buildings_shape_idx
2 ON buildings (shape) INDEXTYPE IS sde.st_spatial_index
3 PARAMETERS ('st_srid=65 st_grids=200');
Index created.
特别注意:一般都不建议使用Oracle的IMP/IMPDP来对ArcSDE数据进行导出导出做迁移,因为这样对数据库技术要求比较高,特别是因为某些版本问题、字符集问题、序列问题、触发器问题、ArcSDE本身的问题导致的迁移出错,一般是很不好处理的,建议使用ArcGIS的迁移方式,数据源1-FGDB,FGDB-数据源2,是不是非常简单,而且不会出错!
-------------------------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
QQ群: 78773981
Blog: http://blog.csdn.net/linghe301
Weibo: http://www.weibo.com/linghe301
-------------------------------------------------------------------------------------------------------

2013

被折叠的 条评论
为什么被折叠?



