Showing posts with label OCDM. Show all posts
Showing posts with label OCDM. Show all posts

Thursday, December 3, 2015

Running OLAP Builds to Load Data into Analytical Workspace

Read the document firstly
https://docs.oracle.com/cd/E64694_01/CDMIG/E64550-04.pdf

This load typically completes in 30-35 minutes.
[oracle@PTUD-S07 ~]$ sqlplus ocdm_sample/*********@orcl

SQL*Plus: Release 12.1.0.1.0 Production on Thu Dec 3 14:56:25 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Last Successful login time: Thu Dec 03 2015 14:03:22 +07:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> begin
pkg_ocdm_olap_etl_aw_load.run;
end;
/

PL/SQL procedure successfully completed.

SQL> select cubename,load_status,error_dtl from dwc_olap_activity order by
cubename; 

ACM COMPLETED-SUCCESS
ADM COMPLETED-SUCCESS
AGRMNT COMPLETED-SUCCESS
APM COMPLETED-SUCCESS
CCM COMPLETED-SUCCESS
CHRN COMPLETED-SUCCESS
CMSN COMPLETED-SUCCESS
COM COMPLETED-SUCCESS
CSM COMPLETED-SUCCESS
IAM COMPLETED-SUCCESS
INV COMPLETED-SUCCESS
INVCM COMPLETED-SUCCESS
RVN COMPLETED-SUCCESS
SLS COMPLETED-SUCCESS

14 rows selected.



How to impdp OCDM_SAMPLE for Oracle Communications Data Model





Step 1: Create tablespace for OCDM_SAMPLE:


SQL>  create tablespace DW_OCDM_SAMPLE datafile '/u01/app/oracle/admin/orcl/datafile/DW_OCDM_SAMPLE.dbf' size 100M autoextend on next 10M;
Tablespace created.
SQL>  create temporary tablespace DW_OCDM_SAMPLE_TEMP tempfile '/u01/app/oracle/admin/orcl/datafile/DW_OCDM_SAMPLE_TEMP.dbf' size 100M autoextend on next 10M;
Tablespace created.

Step 2: Create user ocdm_sample and grant privilege for the user.


create user "OCDM_SAMPLE" identified by ********** profile "DEFAULT" account unlock default tablespace  "DW_OCDM_SAMPLE" temporary tablespace "DW_OCDM_SAMPLE_TEMP";
     
grant CREATE SESSION to "OCDM_SAMPLE";
grant CREATE TYPE to "OCDM_SAMPLE";
grant CREATE SYNONYM to "OCDM_SAMPLE";
grant CREATE MATERIALIZED VIEW to "OCDM_SAMPLE";
grant CREATE TABLE to "OCDM_SAMPLE";
grant CREATE DIMENSION to "OCDM_SAMPLE";
grant CREATE SEQUENCE to "OCDM_SAMPLE";
grant CREATE VIEW to "OCDM_SAMPLE";
grant CREATE JOB to "OCDM_SAMPLE";
grant "OLAP_USER" to "OCDM_SAMPLE";
grant CREATE PROCEDURE to "OCDM_SAMPLE";
grant CREATE TABLESPACE to "OCDM_SAMPLE";
grant CREATE MINING MODEL to "OCDM_SAMPLE";
grant UNLIMITED TABLESPACE to "OCDM_SAMPLE";

Step 3: Import ocdm_sample.dmp


impdp system/******* directory=dump_dir dumpfile=ocdm_sample.dmp logfile=ocdm_sample.log

Wednesday, December 2, 2015

Limiting User Privileges when you install sample reports

[oracle@PTUD-S07 ~]$ more a.sql 
SET LINESIZE 32000;
SET PAGESIZE 40000;
SET LONG 50000;

select 'CREATE OR REPLACE EDITIONABLE SYNONYM OCDM_REPORT.'||Table_Name||' for OCDM_SYS.'||Table_Name||';' from All_Tables where owner='OCDM_SYS';


[oracle@PTUD-S07 ~]$ sqlplus / as sysdba @a.sql >> b.sql &
[4] 141981
[oracle@PTUD-S07 ~]$ cat b.sql | grep 'CREATE OR REPLACE EDITIONABLE SYNONYM' >> c.sql

[4]+  Stopped                 sqlplus / as sysdba @a.sql >> b.sql
[oracle@PTUD-S07 ~]$ sqlplus / as sysdba @c.sql