以下转自百度文库,有时间我会将文档翻译成中文
Spatial是Oracle用来存储、管理、查询空间数据的工具。
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 created your database manually or you want to install Spatial later, then follow these steps.
Manual installation of Spatial 10g / 11g
Prerequisites
To be able to do a successful Spatial 10g / 11g installation you need to have the following products already installed:
JServer JAVA Virtual Machine Oracle interMedia Oracle XML Database To verify if the products are installed and valid run:
SQL> select comp_id,version,status from dba_registry wherecomp_id in ('JAVAVM','ORDIM','XDB');
To (re-)install JServer see:
Note:276554.1
To (re-)install XDB see:
Note:1292089.1
To (re-)install interMedia:
Note:337415.1
Installation of Spatial
If the MDSYS user does NOT exist:
create the user MDSYS by running following command:
SQL> create user MDSYS identified by default tablespace SYSAUX account lock;
grant the required privileges to MDSYS by running:
SQL> @?/md/admin/mdprivs.sql
If the MDSYS user already exists then you are advised to verify if the installation has been done correctly and de-install Spatial first in case of re-installation. See the verification checks at the bottom of this note and a link to de-installation note. Install Spatial by executing the steps shown below. Note you need to run this as a SYSDBA user!
SQL> connect / as sysdba
SQL> spool spatial_installation.lst
SQL> @?/md/admin/mdinst.sql
SQL> spool off
At the end of the installation some verification steps are automatically executed!
You can also manually run the the verification steps later on. See the Spatial verification section further down this note.
It is strongly recommended that the MDSYS user account remains locked.
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:
SQL> alter user MDSYS account lock;
Verification of an Oracle 10g / 11g Spatial InstallationExecute the following steps to verify if Spatial is installed correctly:
SQL> connect / as sysdba
SQL> set serveroutput on
SQL> execute validate_sdo;
SQL> select comp_id, control, schema, version, status, comp_name from dba_registry wherecomp_id='SDO';
SQL> select object_name, object_type, status from dba_objects where owner='MDSYS' and status <> 'VALID' order by object_name;
A sample valid 10.2.0.4.0 installation shows the following output:
SQL> execute validate_sdo;
PL/SQL procedure successfully completed.
SQL> select comp_id, control, schema, version, status, comp_name from dba_registry wherecomp_id='SDO';
COMP_ID CONTROL SCHEMA VERSION STATUS COMP_NAME
----------------------------------------------------------------------------------------------------------------------------------------------------------
SDO SYS MDSYS 10.2.0.4.0 VALID Spatial
no rows selected