SE_layer_migrate_storage

Migrates a layer’s geometry storage from LONG RAW to BLOB, LONG RAW to ST_GEOMETRY, BLOB to ST_GEOMETRY, or SDO_GEOMETRY to ST_GEOMETRY in Oracle databases or SDEBINARY or OGCWKB to GEOMETRY or GEOGRAPHY in Microsoft SQL Server databases.

Usage syntax

LONG SE_layer_migrate_storage (SE_CONNECTION connection, const ACHAR table_name, const ACHAR column_name, const ACHAR config_keyword);

Parameters
connection The connection handle
table_name The name of the business table of the layer to be migrated
column_name The name of the shape column in the business table
config_keyword The DBTUNE configuration keyword specifying the new geometry storage to be used; either SDELOB (for BLOB storage in Oracle), ST_GEOMETRY (Oracle), GEOMETRY (SQL Server), or GEOGRAPHY (SQL Server)
Description

SE_layer_migrate_storage changes the geometry storage type of a layer from one type of storage to another based on the configuration keyword specified.  Applies to layers in Oracle and SQL Server databases only. Supported migrations are:

∙     LONG RAW to BLOB (keyword = SDELOB)

∙     LONG RAW to ST_GEOMETRY

∙     BLOB to ST_GEOMETRY

∙     SDO_GEOMETRY to ST_GEOMETRY

∙     SDEBINARY to GEOMETRY

∙     SDEBINARY to GEOGRAPHY*

∙     OGCWKB to GEOMETRY

∙     OGCWKB to GEOGRAPHY*

*You cannot migrate data with 3D or measure features to the SQL Server geography type.

Converting from LONG RAW to BLOB alters the geometry type in the Feature (F) table.

Converting from LONG RAW or BLOB to ST_GEOMETRY adds an ST_GEOMETRY spatial column to the business table, populates it from the existing F table, adds a domain index on the ST_GEOMETRY spatial column, and drops the existing F and S tables.

Converting from SDEBINARY or OGCWKB to GEOMETRY adds a SQL Server GEOMETRY spatial column to the business table, populates it from the existing F table, adds a domain index on the GEOMETRY spatial column, and drops the existing F and S tables.

Converting from SDEBINARY or OGCWKB to GEOGRAPHY adds a SQL Server GEOGRAPHY spatial column to the business table, populates it from the existing F table, adds a domain index on the GEOGRAPHY spatial column, and drops the existing F and S tables.

Converting from SDO_GEOMETRY to ST_GEOMETRY adds a spatial column of type ST_GEOMETRY to the business table, populates the ST_GEOMETRY column from the existing SDO_GEOMETRY column, creates a new domain index on the ST_GEOMETRY column, and drops the SDO_GEOMETRY column.

Storage migration must be done by the user who owns the layer.

Returns

SE_SUCCESS
SE_ATTR_NOEXIST

SE_DB_IO_ERROR

SE_DBMS_DOES_NOT_SUPPORT

SE_INVALID_COLUMN_TYPE

SE_INVALID_LAYER_KEYWORD

SE_INVALID_LAYER_NAME

SE_INVALID_PARAM_VALUE

SE_INVALID_POINTER

SE_INVALID_RELEASE

SE_LAYER_NOEXIST

SE_LAYER_LOCKED

SE_LOCK_CONFLICT

SE_NET_FAILURE

SE_NO_ACCESS

SE_NO_PERMISSIONS

SE_NO_ROWID_COLUMN

SE_NOT_TABLE_OWNER

SE_OUT_OF_LOCKS

SE_STABLE_LOCKED

SE_TABLE_NOEXIST

SE_TEMP_IO_ERROR

Notes

∙  It is strongly recommended you create a backup of data before geometry storage type migration. For example, this could be in the form of an sdeexport file.

∙  If the layer was registered as versioned, migrating it to a different geometry storage type also updates the shape column in the Adds table. If the layer has archiving enabled, the archive table's shape column also is updated.