1. 程式人生 > >重建Oracle OLAP的方法

重建Oracle OLAP的方法

           昨天在研究如果重建Oracle OLAP,看到網上一些人的帖子,說只要執行一個指令碼 

<span style="font-size:14px;">@?/olap/admin/olap.sql SYSAUX TEMP;</span>

        可是自己試了半天,也沒有安裝成功,後來在Oracle mos上找到一篇文章ID 296187.1,發現執行這個指令碼是有前提條件下,現在就把這個貼子複製過來,給大家參考。

我只複製oracle 10g|11g的安裝方法。

ID 296187.1

For 10G and 11G

There is no need to create the cwmlite tablespace as the catalog is now stored in the SYSAUX tablespace.
All one needs to do in 10g and 11g  is run these scripts on Enterprise instances that require the OLAP option making certain to be connected '/ as sysdba'.

Step 1:

Check the OLAP Option:

select value from v$option where parameter = 'OLAP';

if TRUE, OLAP is turned on. Go to Step 2.
If FALSE, shutdown DB and turn it on:

For Unix:

make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk olap_on
make -f $ORACLE_HOME/rdbms/lib/ins_rdbms.mk ioracle

For Windows Platform the following steps will turn OLAP option ON:

1. Ensure that all processes in the ORACLE_HOME are stopped. This includes the database (if any),
        listener, http (apache) server, intelligent agent, etc..
2. Change to the %ORACLE_HOME%\bin directory
3. Rename oraolapop10.dll.OFF to oraolapop10.dll

Now restart the database




Step 2: Verify 'JServer JAVA Virtual Machine' is present and VALID in the database instance:

SQL> SELECT comp_id, comp_name, status, substr(version,1,10) as version from dba_registry where comp_id like 'JAVAVM';

if this is not present or INVALID then execute these commands when connected as SYSDBA:

SQL> set echo on
SQL> spool JServer.log
SQL>@?/javavm/install/initjvm.sql;
SQL>@?/xdk/admin/initxml.sql;
SQL>@?/xdk/admin/xmlja.sql;
SQL>@?/rdbms/admin/catjava.sql;
SQL> spool off


Step 3: Once the JAVAVM is installed, without errors and is VALID then we need to check and possibly install the components for the XML Database. Please check Document 1292089.1 when installing in 11g Release 2.

SQL> select comp_name, version,status from dba_registry where comp_id in ('XDB','XML');


If this does not return something like:


COMP_NAME                 VERSION                        STATUS
------------------------- ---------------------------    --------
Oracle XDK                10.2.0.4.0                     VALID
Oracle XML Database       10.2.0.4.0                     VALID


then you need to following the following  note: Document 1292089.1 :Master Note for Oracle XML Database (XDB) Install / Deinstall. 

Step 4: Check the remaining requirements:

COMP_NAME                 VERSION     STATUS
------------------------- ----------- -----------
Oracle Expression Filter  10.2.0.4.0  VALID

If that is missing, please run the following as SYS:


?/rdbms/admin/catexf.sql

-- installs the Expression Filter, adds EXF - Oracle Expression Filter
-- component to the dba_registry

Step 5: Now to the final steps to install OLAP itself:

SQL> conn / as sysdba
SQL> spool add_olap.log
SQL> @?/olap/admin/olap.sql SYSAUX TEMP;
SQL> spool off


Check the add_olap.log file for any errors.

Another Method to Add OLAP - Use DBCA (Database Configuration Creation Assistant):

Launch DBCA

On DBCA Step 1 page

            Select the 'Configure Database Options' button
            Click 'Next'

 On Step 2 page

            Select the correct database
            Click 'Next'

 On Step 3 Database Content page
           Under 'Database Components'
           Check 'Oracle Olap'
                 if 'Oracle OLAP' is not an available option
                   then select 'Standard Database Components'
                      check 'Oracle JVM'
                      then select 'OK', returning to the previous page
                      now 'Oracle OLAP' should be available to select
           Click 'Next'
           Click 'Finish'

Restart the database

Check the install with the following:

SQL> column comp_name format a35
SQL> select comp_name, status, substr(version,1,10) as version from dba_registry;


The required components for using OLAP are and should be VALID:


COMP_NAME                        VERSION         STATUS 
-------------------------------- --------------- -----------
OLAP AnalyticWorkspace           10.X            VALID
Oracle OLAP API                  10.X            VALID
OLAP Catalog                     10.X            VALID
JServer JAVA Virtual Machine     10.x            VALID
Oracle XDK                       10.x            VALID
Oracle Database Java Packages    10.x            VALID
Oracle XML Database              10.x            VALID
Oracle Expression Filter         10.x            VALID


After OLAP has been applied and is valid, it is recommended to apply the latest OLAP patches. You can find the list or recommended patches at
http://www.oracle.com/technetwork/database/options/olap/olap-certification-092987.html