lunedì 22 aprile 2013

Tip: Oracle Data Modeler How to display just object names in a diagram

You may need to put your logical or physical diagram in a PowerPoint presentation, but it is quite unpractical showing all columns and details of a table. If you just want to show the Object Name, you have to go to View -> Details -> Only Names.

Then, you can give a better look to your diagram by customizing the look and feel and the best thing is that you can always go back to the full view.

martedì 2 aprile 2013

Tip: Solve ORA-14402

Recently I have partitioned a fact table and today I had to perform the weekly load.
I got into the error:

ORA-14402: updating partition key column would cause a partition change

This error was being raised every time I tried to update the partition field (a date) in a record. To overcome this issue just execute the following:


Tip: Scheduling OWB jobs using SQLPlus

Scheduling jobs in OWB 11g using the Calendar feature is possible only if you have bought the Data Integrator Enterprise Edition, which is not the case of the project I am currently working on.

Error you get when you try to create a new Calendar Module in OWB 11g without Data Integrator EE license

You can still schedule jobs by using a SQLPlus script which can then be called in a .bat or Shell script and scheduled using Windows Scheduler or Crontab in Unix.
In OWB 11g, we can find a SQL script ready to use in [OWBHOME]\owb\rtp\sql. The script you need is called: sqlplus_exec_template.sql
The script can be executed only by a Workspace Owner or a Workspace user with Execute privileges.
The script uses the following parameters:
  • Workspace in which the job is to run: e.g. MY_WORKSPACE Make sure you specify the right Workspace Name. You can check it by executing:  

  • Physical Name of the Location to which this task was deployed: e.g. MY_WAREHOUSE  
  • TASK_TYPE   
    • PLSQLMAP - OWB PL/SQL Mapping
    • PROCESSFLOW - OWB ProcessFlow
    • ABAPFILE - OWB SAP Mapping
    • DATAAUDITOR - OWB DataAuditor Mapping
    • SCHEDULEDJOB - OWB Scheduled Job
    • CTMAPPING  - OWB Template Mapping
  • Physical Name of the Deployed Object.e.g. MY_MAPPING. Make sure you specify the TASK_NAME in the following format: [PARENT_TASK]/TASK_NAME
  • SYSTEM_PARAMS { , | (name = value [, name = value]...)}
  • CUSTOM_PARAMS { , | (name = value [, name = value]...)}
The following example shows how to call the DIM_ALL workflow under DIM_FACT workflow package deployed in WFS_LOCATION location in MYWKS workspace.

/DIM_ALL" "," ","

The script calls functions from the OWBSYS.wb_rt_script_util package so you may need to grant the right privilege to the OWB User.