MINI MINI MANI MO
Rem Copyright (c) 1998, 2017, Oracle and/or its affiliates.
Rem All rights reserved.
Rem
Rem NAME
Rem sdotmig.sql - Migration
Rem
Rem DESCRIPTION
Rem
Rem NOTES
Rem
Rem BEGIN SQL_FILE_METADATA
Rem SQL_SOURCE_FILE: sdo/admin/sdomig.sql
Rem SQL_SHIPPED_FILE: md/admin/sdomig.sql
Rem SQL_PHASE: UPGRADE
Rem SQL_STARTUP_MODE: NORMAL
Rem SQL_IGNORABLE_ERRORS: NONE
Rem SQL_CALLING_FILE: sdo/admin/catmdlocp2.sql
Rem END SQL_FILE_METADATA
Rem
Rem MODIFIED (MM/DD/YY)
Rem rjanders 10/08/17 - Add MDSYS to spatial type
Rem rjanders 04/27/17 - Correct "SQL_PHASE" metadata values
Rem rjanders 03/09/17 - Add missing SQL_FILE_METADATA information
Rem rjanders 03/15/13 - #16473696: Start/End _ORACLE_SCRIPT
Rem initialization
Rem rjanders 02/24/11 - Make sdo_geometry functions deterministic
Rem sravada 02/18/05 - bug 4148525
Rem sravada 02/13/02 - add row level migrate
Rem sravada 12/15/00 - add new migrate interfaces
Rem sravada 10/24/00 - add a generic migrate interface
Rem sravada 02/10/00 - multi transaction migration
Rem ranwei 09/02/99 - 815-to-816 migration
Rem ranwei 11/20/98 - Add update function to migration tool
Rem sravada 06/29/98 - add point-only layer interface
Rem pfwang 06/08/98 - Rename to_813 to to_81x
Rem pfwang 06/02/98 - Add OGIS Metadata migration procedures
Rem pfwang 05/29/98 - Complete functionalities
Rem gvincent 04/22/98 - Created
Rem
Rem ********************************************************************
Rem #16473696: Indicate Oracle-Supplied object
@@?/rdbms/admin/sqlsessstart.sql
Rem ********************************************************************
CREATE OR REPLACE PACKAGE MDSYS.sdo_migrate authid current_user AS
--
-- NAME:
-- to_734
-- DESCRIPTION:
-- Update an SDO 7.3.3 layer structure to a 7.3.4 layer structure.
-- ARGUMENTS:
-- sn - Schema Name of owner of layer
-- layer - LAYER name
-- tess_type - TESSellation TYPE
-- param - SDO_LEVEL or SDO_NUMTILES value
-- USAGE:
-- 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)
--
-- In each case the value of the PARAM argument is evaluated relative
-- to the value of the TESS_TYPE arguments. If the TESS_TYPE aregument
-- is FIXED then PARAM is the SDO_LEVEL values. If the TESS_TYPE
-- argument is VARIABLE them the PARAM value is the SDO_NUMTILES value.
--
/* deprecated
procedure to_734( sn varchar2,
layer varchar2,
tess_type varchar2,
param integer ); */
--
-- Migrate from 734 format to 81x object format
-- Index is NOT built!
--
-- The geom table and dim tables will be migrated.
-- layer_gtype can either be 'POINT' or 'NOTPOINT' ('NOTPOINT' by default);
-- update_flag can either be 'INSERT' or 'UPDATE' ('INSERT' by default);
--
procedure to_81x(layer IN varchar2,
newtabname IN varchar2,
gidcolumn IN varchar2,
geocolname IN varchar2,
layer_gtype IN varchar2 := 'NOTPOINT',
update_flag IN varchar2 := 'INSERT');
procedure to_current(layer IN varchar2,
newtabname IN varchar2,
gidcolumn IN varchar2,
geocolname IN varchar2,
layer_gtype IN varchar2 := 'NOTPOINT',
update_flag IN varchar2 := 'INSERT');
--
-- Migrate from 815 format to 816 object format
--
-- All geometry objects in geom table will be migrated so that
-- their GTYPE and ETYPE will be of 8.1.6 style.
--
procedure from_815_to_81x(tabname IN varchar2,
commit_int IN number := -1);
procedure to_current(tabname IN varchar2,
column_name IN varchar2 := NULL,
commit_int IN number := -1);
--
-- Migrate OGIS metadata entries in MDSYS's schema
-- Called at the source of migration.
-- This procedure will produce a temporary table called
-- SDO_GC_MIG that needs to be exported with other data.
--
procedure ogis_metadata_from;
--
-- Migrate OGIS metadata entries in MDSYS's schema
-- Called at the destination of migration
-- This call expects SDO_GC_MIG to exist.
--
procedure ogis_metadata_to;
function to_current(geom IN MDSYS.SDO_GEOMETRY,
dim IN MDSYS.SDO_DIM_ARRAY)
return MDSYS.SDO_GEOMETRY DETERMINISTIC PARALLEL_ENABLE;
END sdo_migrate;
/
Rem ********************************************************************
Rem #16473696: Indicate Oracle-Supplied object
@?/rdbms/admin/sqlsessend.sql
Rem ********************************************************************
OHA YOOOO