Oracle® Spatial User's Guide and Reference 10g Release 2 (10.2) Part Number B14255-03 |
|
|
PDF · Mobi · ePub |
If you are upgrading to Oracle Database 10g, Oracle Spatial is automatically upgraded as part of the operation. For information about the upgrade procedure, see Oracle Database Upgrade Guide.
If you need to downgrade Spatial to the previous Oracle Database release, follow the instructions for downgrading a database back to the previous Oracle Database release in Oracle Database Upgrade Guide.
If you have LRS data in release 8.1.5, 8.1.6, or 8.1.7 format, see Section A.1.
If you use Oracle Spatial GeoRaster, see Section A.2.
If you have linear referencing data (that is, geometries with measure information) in release 8.1.5, 8.1.6, or 8.1.7 format, you must upgrade that data to the format for Spatial releases 9.0.1 and later, as follows:
Drop any spatial indexes on the table with the linear referencing data.
Find out which dimension of the object has the linear referencing information.
This could be the third or the fourth dimension, depending on the dimensionality of the data. For example, if the data has three dimensions (such as X, Y, and height), the LRS geometry object is 4D, and the LRS dimension in this case is usually 4.
Make sure that the data is in the format for release 8.1.6 or later (that is, it has 4-digit SDO_GTYPE values).
Update the LRS geometry objects by setting the LRS dimension in the SDO_GTYPE field, as in the following examples.
Example 1: The LRS dimension is 3 for the geometries in the GEOMETRY column of table LRS_DATA. Update the SDO_GTYPE as follows:
UPDATE LRS_DATA a SET a.geometry.sdo_gtype = a.geometry.sdo_gtype + 300;
Example 2: The LRS dimension is 4 for the geometries in the GEOMETRY column of table LRS_DATA. Update the SDO_GTYPE as follows:
UPDATE LRS_DATA a SET a.geometry.sdo_gtype = a.geometry.sdo_gtype + 400;
If you are upgrading to Oracle Database 10g and if you use the GeoRaster feature of Oracle Spatial, Oracle XML DB Repository must be installed, and the value of the COMPATIBILITY
database initialization parameter must be 10.0
or greater. Before you use GeoRaster in the upgraded instance, ensure that both of these requirements are met, and if necessary reload the GeoRaster PL/SQL packages. Follow these steps:
Check to see if Oracle XML DB Repository is installed by checking if a schema exists in the database for a user named XDB. If the schema for user XDB exists, Oracle XML DB Repository is installed.
If Oracle XML DB Repository is not installed, install it with DBCA or by running the script catqm.sql
, which is located in the $ORACLE_HOME
/rdbms/admin
directory.
For more information about installing and uninstalling Oracle XML DB Repository, see Oracle XML DB Developer's Guide.
Check the value of the Oracle initialization parameter COMPATIBLE
.
If the value of the COMPATIBLE
initialization parameter is less than 10.0
, change the value to 10.0
.
For more information about the COMPATIBLE
initialization parameter, see Oracle Database Reference.
If you did not install Oracle XML DB Repository or change the value of the COMPATIBLE
initialization parameter, stop; do not perform the remaining steps.
If you installed Oracle XML DB Repository or changed the value of the COMPATIBLE
initialization parameter, or did both, go to the next step.
Go to the $ORACLE_HOME
/md/admin
directory.
Connect to the database as SYS AS SYSDBA
.
Enter the following SQL statements:
ALTER SESSION SET CURRENT_SCHEMA=MDSYS; @prvtgrs.plb @sdogrxml.sql