Oracle® Spatial Developer's Guide 11g Release 2 (11.2) Part Number E11830-02 |
|
|
View PDF |
If you are upgrading to Oracle Database 11g, 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 use Oracle Spatial GeoRaster, see Section A.1.
If you are using Spatial Web Feature Service (WFS) or Catalog Services for the Web (CSW) support, and if you have data from a previous release that was indexed using one or more SYS.XMLTABLEINDEX indexes, see Section A.2.
If you need to support geometries with more than 1,048,576 ordinates, see Section A.3.
To use the GeoRaster feature of Oracle Spatial, Oracle XML DB Repository must be installed properly. (In general, you should ensure that Oracle XML DB Repository is installed before you install Oracle Spatial.)
If Oracle Spatial has been installed (such as during an upgrade) but Oracle XML DB Repository is not installed, you need to install the Oracle XML DB Repository and reload related GeoRaster PL/SQL packages. In this case, follow these steps
Install Oracle XML DB Repository.
For information about installing and uninstalling Oracle XML DB Repository, see Oracle XML DB Developer's Guide.
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
Effective with Release 11.2, the SYS.XMLTABLEINDEX index type is deprecated, and therefore the Spatial WFS and CSW createXMLTableIndex
methods create indexes of type XDB.XMLINDEX instead of type SYS.XMLTABLEINDEX as in previous releases. However, if you have data from a previous release that was indexed using one or more SYS.XMLTABLEINDEX indexes, you must drop the associated indexes before the upgrade and re-create the indexes after the upgrade, as follows:
Using Oracle Database Release 11.1, call the dropXMLTableIndex
method (in oracle.spatial.csw.CSWAdmin
or oracle.spatial.wfs.WFSAdmin
, as appropriate depending on the application) to drop associated indexes.
Upgrade the database from Release 11.1 to Release 11.2.
Using Oracle Database Release 11.2, call the createXMLTableIndex
(in oracle.spatial.csw.CSWAdmin
or oracle.spatial.wfs.WFSAdmin
, as appropriate depending on the application) to create indexes that were dropped in step 1.
For information about Spatial Web Feature Service (WFS) support, see Chapter 15, and especially the following:
createXMLTableIndex
method (Section 15.4.1)
dropXMLTableIndex
method (Section 15.4.3)
getIsXMLTableIndexCreated
method (Section 15.4.4)
genXMLIndex
and idxPaths
parameters of the publishFeatureType
method (Section 15.4.7)
setXMLTableIndexInfo method (Section 15.4.10)
For information about Spatial Catalog Services for the Web (CSW) support, see Chapter 16, and especially the following:
createXMLTableIndex
method (Section 16.4.1)
dropXMLTableIndex
method (Section 16.4.6)
getIsXMLTableIndexCreated
method (Section 16.4.8)
genXMLIndex
and idxPaths
parameters of the publishRecordType
method (Section 16.4.12)
setXMLTableIndexInfo
method (Section 16.4.19)
If you need to support geometries with more than 1,048,576 ordinates, you must follow the instructions in this section. However, doing so involves significant extra work (running a script, migrating existing spatial data), some database downtime , and some considerations and restrictions. Therefore, you should not perform the actions in this section unless you need to.
To increase the size of ordinate arrays to support geometries with up to 10M ordinates, follow these steps:
Ensure that no users are using any spatial tables or Oracle Spatial or Locator features.
Connect to the database as the SYS user with SYSDBA privileges (SYS AS SYSDBA, and enter the SYS account password when prompted).
Start SQL*Plus, and enter the following statement:
Linux: @$ORACLE_HOME/md/admin/sdoupggeom.sql
Windows: @%ORACLE_HOME%\md\admin\sdoupggeom.sql
One of the actions of the sdoupggeom.sql
script is to automatically migrate all spatial data to accommodate the new SDO_ORDINATE_ARRAY definition. This script may take a long time to complete, and the amount of time will depend on the amount of spatial data that exists in the database.
After you perform these steps, the following considerations and restrictions apply:
Any existing transportable tablespaces that were created with the old SDO_ORDINATE_ARRAY definition will not work.
If an export file was created using the Original Export utility on a database with the old SDO_ORDINATE_ARRAY definition, and if that file needs to be imported into a database that is using the new SDO_ORDINATE_ARRAY definition, you must specify the TOID_NOVALIDATE
flag with the Original Import utility, as in the following example:
imp scott/<password> file=states.dmp tables=states TOID_NOVALIDATE=MDSYS.SDO_GEOMETRY,MDSYS.SDO_ORDINATE_ARRAY,MDSYS.SDO_ELEM_INFO_ARRAY