Oracle Spatial User's Guide and Reference
Release 9.0.1

Part Number A88805-01

Library

Product

Contents

Index

Go to previous page Go to next page

A
Installation, Compatibility, and Migration

This appendix provides information concerning installation, compatibility, and migration between various Oracle Spatial product releases.

You must upgrade both the database server and Spatial at the same time if you wish to use older spatial applications with an Oracle9i release of Spatial. Spatial must always be synchronized with the Oracle9i database server on upgrade or downgrade. In both cases, Spatial must be reinstalled.

A.1 Introduction

Many of the Spatial release 9i features depend on new features in release 9i of the database server. Therefore, there are compatibility and migration issues that need to be addressed in this release of Spatial. This appendix outlines the database and application compatibility issues.

An upgrade or downgrade of the database server version requires a corresponding upgrade or downgrade of Spatial. If an Oracle8i (8.1.5, 8.1.6, or 8.1.7) database server is upgraded to an Oracle9i database server, Spatial must also be upgraded. Similarly, if an Oracle9i database server is downgraded, Spatial must be downgraded too. Lastly, if an Oracle9i database server is running in Oracle8i compatibility mode, features that are new for Spatial in release 9.0.1 (Oracle9i) will not work.

In summary:

A.2 Installation of Spatial

This section applies to new users of Oracle Spatial. If you are upgrading from a previous release of Spatial, see Section A.4 for migration information.

When you install Oracle release 9.0.1, the option to install Spatial is preselected by default. If you accept this default, you do not need to perform the installation steps described in this section, because the MDSYS user is already created and locked automatically.

If you create an Oracle database using the Database Configuration Assistant (DBCA), Spatial is installed by default and you do not need to perform the installation steps described in this section.

If you did not select the option to install Spatial at installation time and you want to install Spatial later, follow these steps.


Note:

Installation of Spatial for release 9.0.1 requires that the COMPATIBLE init.ora parameter is set to 9.0.0.0.0 or higher. This is required for the creation and definition of Spatial index types and operators. Thus, if the database was created with a compatibility parameter value of 8.n.n.n.n, the DBA must shut down the database and restart with COMPATIBLE=9.0.n.n.n.  


  1. Connect as SYS to the Oracle9i instance as SYSTEM AS SYSDBA.

  2. Create the MDSYS user with a command in the following format:

    CREATE USER MDSYS IDENTIFIED BY <password>;
    
    
  3. Grant the required privileges to the MDSYS user by running the following procedure:

    @ORACLE_HOME/md/admin/mdprivs.sql
    
    
  4. Connect as MDSYS.

  5. Install Spatial by running the following procedure:

    @ORACLE_HOME/md/admin/catmd.sql
    
    

After you install Spatial, it is strongly recommended that you lock the MDSYS user. The MDSYS user is created with administrator privileges; therefore, it is important to protect this account from unauthorized use. To lock the MDSYS user, connect as SYS and enter the following command:

ALTER USER MDSYS ACCOUNT LOCK;

A.3 Changing from Oracle9i to Oracle8i Compatibility Mode

If Spatial has been installed and the database compatibility needs to be reset to 8.1.n.n.n from 9.0.n.n.n, enter the following while connected as SYSTEM:

ALTER DATABASE RESET COMPATIBILITY  
SHUTDOWN 
<Change  the init.ora parameter COMPATIBLE=8.1.0.0.0>
STARTUP 

Note that performing this operation disables function-based spatial indexing and partitioning support for spatial indexing.

A.4 Migrating from Spatial Release 8.1.5, 8.1.6, or 8.1.7

If you are upgrading from Spatial release 8.1.5, 8.1.6, or 8.1.7 to Spatial for release 9i, and if you have not chosen the automatic upgrade option, perform the following steps to migrate to Spatial for release 9i.


Note:

The following steps are not necessary if you chose the Oracle Installer option for an automatic upgrade.

If you have linear referencing system (LRS) data, you must perform the steps in Section A.5 regardless of whether or not you chose an automatic upgrade. 


  1. Make sure that the Oracle RDBMS is upgraded to release 9i.

  2. Connect as SYSTEM AS SYSDBA.

  3. Grant the required privileges to the MDSYS user by running the following procedure:

    $ORACLE_HOME/md/admin/mdprivs.sql
    
    
  4. Connect as MDSYS.

  5. Perform the migration by running the following procedure:

    $ORACLE_HOME/md/admin/c81Xu900.sql
    

A.5 LRS Data Migration

If you have linear referencing data (that is, geometries with measure information), you must migrate that data to the Spatial release 9.0.1 format, as follows:

  1. Drop any spatial indexes on the table with the linear referencing data.

  2. 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 3 dimensions (such as X, Y, and height), the LRS geometry object is 4D, and the LRS dimension in this case is usually 4.

  3. Make sure that the data is in the format for release 8.1.6 or higher (that is, it has 4-digit SDO_GTYPE values).

  4. 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;
    


Go to previous page Go to next page
Oracle
Copyright © 2001 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index