8
Migration Procedures
The procedures described in this chapter let you upgrade geometry tables from previous releases of Spatial Cartridge or Spatial Data Option.
This chapter contains descriptions of the migration procedures shown in Table 8-1.
SDO_MIGRATE.TO_734
Purpose
This procedure migrates data from a previous release of Spatial Data Option to release 7.3.4.
Syntax
SDO_MIGRATE.TO_734 (schema_name, layername, tessellation, param)
Keywords and Parameters
schema_name |
Specifies the schema name of the owner of the layer. Data type is VARCHAR2. |
layername |
Specifies the name of the layer. Data type is VARCHAR2. |
tessellation |
Specifies the type of indexing used, either FIXED or VARIABLE. Data type is VARCHAR2. |
param |
Specifies the SDO_LEVEL or SDO_NUMTILES value. Data type is NUMBER. |
Usage Notes
The value of the param argument is evaluated relative to the value of the tessellation argument. If tessellation is FIXED, then param is the SDO_LEVEL value. If tessellation is VARIABLE, then param is the SDO_NUMTILES value.
Examples
For fixed-size tessellation:
SQL> execute sdo_migrate.to_734('HERMAN', 'ROADS', 'FIXED', 10);
For variable-sized tessellation:
SQL> execute sdo_migrate_to_734('HERMAN', 'ROADS', 'VARIABLE',4);
SDO_MIGRATE.TO_81X
Purpose
This procedure migrates data from a previous release of Spatial Cartridge or Spatial Data Option to Oracle8i Spatial (release 8.1.5.)
Syntax
SDO_MIGRATE.TO_81X (old_layername, new_tablename geom_column, GID_column,
layer_gtype, update_flag)
Keywords and Parameters
old_layername |
Specifies the name of the old layer. Data type is VARCHAR2. |
new_tablename |
Specifies the name of the new table to which you are migrating the data. Data type is VARCHAR2. |
GID_column |
Specifies the name of the column in which to store the GID from the old table. Data type is NUMBER. |
geom_column |
Specifies the column name in the new table where the geometry object will be inserted. Data type is SDO_GEOMETRY. |
layer_gtype |
If the layer you are migrating is composed soley of point data, set this parameter to 'POINT' for optimal performance. Data type is VARCHAR2. Default is 'NOTPOINT'. |
update_flag |
Specifies special processing for point data.
If you are migrating the layer into an existing populated attribute table, set this parameter to 'UPDATE'. Data type is VARCHAR2. Default is 'INSERT'. |
Usage Notes
Consider the following when using this procedure:
- The new table must be created prior to calling this procedure.
- This procedure converts from Spatial Data Option release 7.3.4, or from Spatial Cartridge releases 8.0.4 and 8.0.5.
- There is no implicit commit when using this procedure. You must commit the migration explicitly.
- If any of the migration steps fails, nothing is migrated for the layer.
- The old_layername is the underlying layername, without the _SDOGEOM suffix.
- An SDO_GEOM_METADATA table is required in the user's schema.
- The old SDO_GID is stored in GID_column.
Examples
Insert point-only data into new rows:
execute sdo_migrate.to_81x('raptor', 'raptor', 'sdo_gid', 'feature', 'point');
Insert nonpoint data into new rows:
execute sdo_migrate.to_81x('BTU', 'BTU', 'sdo_gid', 'feature');
Update point-only data into existing rows:
execute sdo_migrate.to_81x('raptor', 'raptor', 'sdo_gid', 'feature',
'point', 'update');
Update nonpoint data into existing rows:
execute sdo_migrate.to_81x('BTU', 'BTU', 'sdo_gid', 'feature',
'notpoint', 'update');
SDO_MIGRATE.OGIS_METADATA_FROM
Purpose
This procedure is called at the source database when migrating from one 8.1.5 database to another 8.1.5 database. The procedure migrates OGIS metadata entries from schemas owned by mdsys.
Syntax
SDO_MIGRATE.OGIS_METADATA_FROM
Keywords and Parameters
None.
Usage Notes
Consider the following when using this procedure:
- The tables involved are strictly maintained by the user, and not by Spatial. Details are available in the sdocat.sql file and the OpenGIS specification.
- Call this procedure once before migrating the data, and it will generate a temporary table called SDO_GC_MIG. Export the temporary table to the new database and call SDO_MIGRATE.OGIS_METADATA_TO to restore the data.
SDO_MIGRATE.OGIS_METADATA_TO
Purpose
This procedure is used at the destination database when migrating from one 8.1.5 database to another 8.1.5 database. The procedure migrates OGIS metadata entries from schemas owned by mdsys.
Syntax
SDO_MIGRATE.OGIS_METADATA_TO
Keywords and Parameters
None.
Usage Notes
Consider the following when using this procedure:
- The tables involved are strictly maintained by the user, and not by Spatial. Details are available in the sdocat.sql file and the OpenGIS specification.
- Call this procedure once after migrating the data. See SDO_MIGRATE.OGIS_METADATA_FROM.