2010-11-26

how to install oracle spatial 10g/11g

Steps for Manual Installation / Verification of Spatial 10g / 11g (Doc ID 270588.1)

Applies to:

Oracle Spatial - Version: 10.1.0.2 to 11.2.0.1 - Release: to 11.2 Information in this document applies to any platform.

Goal

Checked for relevance on 30-Nov-2009. This article lists the steps for manual installation of Oracle10g and 11g Spatial and verification of the Spatial installation.

Solution

General comments

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
     where comp_id in ('JAVAVM','ORDIM','XDB');   

To (re-)install JServer see: Note:276554.1
To (re-)install XDB see: Note:243554.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 <password> 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 Installation

Execute 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 
              where comp_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 
              where comp_id='SDO';

    COMP_ID                        CONTROL
    ------------------------------ ------------------------------
    SCHEMA                         VERSION                        STATUS
    ------------------------------ ------------------------------ -----------
    COMP_NAME
    --------------------------------------------------------------------------------
    SDO                            SYS
    MDSYS                          10.2.0.4.0                     VALID
    Spatial             


    no rows selected  

3 comentarii: