More date arithmetic

22 04 2009

I came across this today. I have been having quite a ball these last weeks with dates, periods and mainly overlapping periods in two tables. Therefore I am currently rather interested in date handling. This is definitely one for the Tips & Tricks book I seem to be gathering here. Nice post.





OWB Process Flows that keep saying they are running

20 04 2009

Now and then an OWB started Processflow has trouble finishing. Or more likely I have created an incomplete Processflow. Most of the time this leads to an error when deploying the processflow again:

RPE-02062: ItemType LOAD_CMS cannot be dropped as it has running Processes. You must first abort all the running processes using the Oracle Workflow Monitor

To find out if there are any such processflows I use the following query:

SELECT item_type, item_key
FROM wf_item_activity_statuses_v
WHERE activity_type_code= 'PROCESS'
AND activity_status_code != 'COMPLETE';

And you can tell OWF the processflow is not running anymore with:

DECLARE
t_result VARCHAR2(300);
BEGIN
wf_engine.abortprocess (‘itemtype’,’itemkey’,t_result);
COMMIT;
END;

Where Itemtype and ItemKey must be copied from the results of the query.

There are probably more sophisticated methods to handle these situations (probably from OWF-savvy people), but it gives me a handle to know what is going on and what I can do about it.

Edit November 24, 2010:

Sometimes you cannot find any information using the first query above. But still you get the RPE-2062 error. An even more radical approach would be to remove all audit/run-time information about the process flow from OWF. This means you will have to redeploy the process flow, but that is what you had planned anyway. There is a script for this purpose that can be found in <ORACLE_HOME>/wf/admin/sql/wfrmitt.sql. Mind about the slashes or backslashes for your environment. The <ORACLE_HOME>/wf directory is only present on the server where you have installed the workflow software. In most client installations it won’t be there.
Execute the script as the workflow user.





Little known but useful facts about Oracle

31 03 2009

Laurent Schneider has a blog that I follow and always has tiny facts that you think you know the details about. But, when you look closely, the details are somewhat different from what you thought they were.

One such gem today: 1 <> 1 and another about 2 weeks ago: commit suicide





Number of days in a year

26 03 2009

I tend to forget these things. So I\’d better write them down.

select to_date(\'09-sep-2009\') - trunc(\'09-sep-2009\', \'mm\') days_since_month_begin 
,trunc (to_date(\'09-sep-2009\'),\'yyyy\') first_day_of_year
,interval \'1\' year just_curious
,to_char(trunc (to_date(\'09-sep-2009\'),\'yyyy\')+ interval \'1\' year - 1 , \'ddd\') days_in_year
from dual;





Missing window panes in OWB editors

18 03 2009

Update 24-12-2010: In OWB 11gR2 things are a bit different. It is more difficult to hide windows and not find them back for one thing. But if you still do, instructions on what to do can be found here.

I have been having this several times. And each time I have to look for the exact location and name of the files you have to handle to fix things. So now I intend to note the reference to the blog entry and at least one forum discussion here. So I will be able to find it.

The problem at hand is that now and again the ‘Palette’ or ‘Object properties’ window pane disappear from the Mapping Editor or the Process Flow Editor. Or any other editor in OWB. No matter how often you activate or deactivate the window pane in the ‘window’ menu, it just won’t appear. I found the solution in the OWB blog, here. But, for my own sake, I will copy it in this blog entry.

Lost your panels in the UI – here is how to fix it…

I have seen people ask this question a couple of times, and there is actually an easy fix to the problem. The layout for an editor (editors are for example the mapping editor, the data object editor, the profile explorer etc.) is saved per computer to the file system. These files are written everytime the layout is changed and when running the editor OWB reads the layout. That is why, if a panel is “gone” it will stay that way…

When the product is newly installed these editor layout files are not there, so removing them is the solution to “missing panels”. Removal means the panels are appearing as they are in “factory defaults”.

You can find the layout files in “<Oracle Home>/owb/bin/admin” and they are typically either named <editorname>layout.xml (most of them) or <componentname>.layout. For example for mappings, the layout file is MappingEditorLayout.xml, for the console (the designer) the files is called console.layout.

I typically remove the file from the file system, but you may want to try renaming it if you are unsure that this is what you want to try…

Update 11gR2:
Things have changed, for better or worse we’ll have to see. Any way, here’s a link to the 11gR2 way of doing the above.





UKOUG; My schedule and gradually some notes

3 12 2008

Monday december 1st

Keynote    ‘Oracle Corporate and Product Strategy Update’, David Callaghan, Oracle

As keynotes go, general and fluffy. Main point: Oracle is (trying to be) complete, open and integrated.

Beginners’ Guide to Partitioning, Mr Jonathan Lewis, JL Computer Consultancy
Indeed a beginners guide. But mr. Lewis could not help himself and he did put some valuable advice in regarding performance aspects. Such as:

  • There is a penalty to partitioned indexes which can lead to having to visit every partition which is not expected behaviour
  • Bind variables may make it difficult for the CBO to do partition pruning, dates can do that as well, and make sure you use 4-digit years preventing the optimizer from thinking you are talking about the first century
  • New to me, but probably not to others, Bloom filter (in 11g, maybe already in 1ogR2?), something to investigate
  • Partition exchange when a global (unique) index is present will require checking of the index even when using the NOVALIDATE clause.

And a teaser/challenge to check whether it is possible to solve the performance problem of “where ‘2007-01-01’  between start_date and end_date” with a range-range composite partitioned table.

Oracle Business Intelligence Road Map and Strategy, Mr Nick Tuson, Oracle

General introduction of where Oracle thinks the place of BI is. It is a key support part of Enterprise Performance Management (EPM). And EPM is supported by virtually all Oracle Products, not only the BI products. Oracle uses something that they have called the Common Enterprise Information Model (CEIM). I will try to find a reference or white paper to it later.

BI applications have a new component wich will be the integration of Oracle Data Integrator (ODI, formerly Sunopsis).

Lots of new and changed interfaces, personalised start page, lend from server technology and Fusion middleware integration.

Probably a useful presentation if you are ‘into’ OBIEE, Hyperion and the like. Unfortunately I am not.

Anatomy of Data Breaches: How They Occur and How to Protect Against Them, Ms Tammy Bednar, Oracle

Excellent material of how you can characterise the types of people that are a threat to your systems. Including the measures you can take to prevent the data breaches from happening. If the presenter had been a bit less nervous the presentation would have been even stronger. I hope to very soon see the slides on the UKOUG conference website so I can build on that to win over more people to consider security.

Flash Recovery Area, Mr Tuomas Pystynen, Miracle Finland Oy

As can be expected of Tuomas a thorough investigation of what the FRA is, what kind of files it holds, what the drawbacks are of using it and even a novel use of FRA for making a copy of a database. If you have enough diskroom, of course nothing is free.

Below a short description of the kind of files FRA can hold and a warning (by Tuomas) that you can place other files in the FRA but then they are not seen by the processes that guard the filling up of the FRA and you could end up with a low level error along the lines of ‘file system full’.

• Current control file
• Online logs
• Archived logs
• Control file autobackups and copies
• Datafile copies
• Backup pieces
• Flashback logs

Only the last logs will actually be used in a Flashback feature (flashback database to be precise) so why it is called Flash Recovery Area is a matter of opinion.

The best way… , Thomas Kyte, Database Product Evangelist, Oracle

I would like to call the presentation a kind of ‘rant’ against the people who, just like that, want to know what is the BEST way to do something. And they don’t want to spent time thinking about whether the way they have been given is indeed the best way in their circumstances. Which is almost never the case. I think it is about save to say that we all know the standard answer to the standard ‘best way’ question; It depends. And the above illustrated in a manner that we all would love to be able to copy. But alas, there is only one Tom Kyte.

And then the UKOUG 2008 Opening Party …….

Tuesday december 3rd

‘Oracle Exadata – Extreme Performance’ , Andrew Mendelsohn, Oracle

A short reprise of why we need a database machine or even a storage server. And all that from Oracle. Very interesting, but it will be some time before most of us will see such a database machine from close by. At least for me, the dataware houses I’m working on are not that big.

Monitoring Oracle using Open source software, Mr Jason Lester, DSP Managed Services

A good, well structured presentation of why you would choose Open Source Software (OSS). And in this case not from a technical viewpoint, but from a business viewpoint. Main points being vendor lock-in and dependency on key technicians with commercial software. Also a good overview of what OOS products come into play and how you can integrate several products into a valuable ‘dashboard’. There must be something there for the Techies as well. Looking forward to this document being uploaded as well.

Change, Change, Change, Mr Tom Kyte, Oracle

What can I say, good as ever. Read his blog.

Oracle 11g’s SuperModels: Predictably Enhanced, Ms Melanie Caffrey, Oracle

Weird PL/SQL, Mr Steven Feuerstein, Quest Software

Database Constraints – A Woeful State of Affairs and a Polite Excuse, Dr Hugh Darwen, University of Warwick; Mr Toon Koppelaars, RuleGen BV

Socializing in the COMMUNITY FOCUS PUBS …..

Wednesday, december 4th

Designing Data Warehouse in Oracle 11g, Mr Vincent Chazhoor, Lafarge NA

Data Warehouse modelling for dummies, Mr Andrew Bond, Oracle

Sort Merge: Coming to a join near you, Ric Van Dyke, Hotsos

Active Statistics, Mr Wolfgang Breitling, Centrex Consulting Corporation

Performance Tuning Basics, Mr Doug Burns, Bayvale

Visual Data Modelling with SQLDeveloper, Sue Harper, Oracle

Last, but not least; 25th YEAR CELEBRATION PARTY

Thursday, december 4th

A complete BI+W Architecture, Mr. Andrew Bond, Oracle

What’s in Oracle Warehouse Builder 11GR2, Miss Nathalie Nunn, Oracle

Comparing Materialized Views and Analytic Workspaces in Oracle Database 11g, Keith Laker, Oracle

Deploying a Dimensional Model on the Oracle Database, Stewart Bryson, Rittman Mead Consulting

Managing OWB 10gR2 in a deployed environment, Wolfgang Scherrer, infomArt Gmbh

Variance as a tool: Measuring for Robust Performance, Ms Robyn Sands, Cisco

Optimizing Systems by Eliminating Throwaway, Mr Daniel Fink, OptimalDBA

Early night, much needed.

Friday, december 5th, Sinterklaas, pakjesavond

Not home this night so I won’t get any presents from Sinterklaas this year. Oh well, I don’t know if I have been that good a boy this year.

Oracle 11g Data Warehousing Masterclass, Mr Mark Rittman, Rittman Mead Consulting

Advanced SQL Features, Mr Daniel Fink, OptimalDBA





I’m officially a ‘nutcase’

30 09 2008

I still don’t know if nutcase is the right word for the French ‘cinglé’ but it seems close to the Dutch ‘malloot’ which seems close to the French word. Anyway as I mentioned in my last post (ages ago) I was going to cycle and camp with my wife through the Netherlands, Belgium, Luxemburg and France. And along the way try to climb the Mont Ventoux 3 times on one day. Thus becoming eligible for membership of the Club de cinglé du Mont Ventoux with the climbs. And just last week I received the official notification that I now am a member of the club. It is an honour to be accepted although the experience itself was hard, tiring, cold (rain in the descent), warm even hot but very gratifiing.

And the goal for next year has already been set. Some of my collegues have entered our company in a tour up the Alpe d’Huez. Not once, but six times. At least that is the personal goal. Overall goal of the tour (Dutch web site here) is to get as much money as possible for Cancer research in the Netherlands. And that is what we will be doing in between training. Get Sponsors!





I did it

6 07 2008

Today I posted the letter containing my application for entrance into the (I like to think) very select Club des Cinglés du Mont Ventoux. Now it is only my application and I still have a long way (literally) to go before I make a real member. But it is a first step.

For anyone that does not read french very well, there is also a Dutch version and a blog in english of a group of dutch cyclists that completed the tour this spring.

So in the last week of august I will be trying to climb the Mont Ventoux on my bicycle three times in one day by three different routes. The distance of 136km is not the problem , I ride that kind of distance about once a week during training. The problem is there are no mountains here in Holland and I will have to climb 4443m. The nearest hill is about 200km away from my home and the highest is 395m, which is lower than the start of the climb of the Mont Ventoux. My wife came up with a nice solution for all this. She proposed to make our holiday this summer into a preparation for the Ventoux. So on the first of august (as my birthday present as I considerate it) we will leave home near Amsterdam on our bikes to arrive about 2 or 3 weeks later in the vicinity of the Mont Ventoux. A perfect preparation and we will pass a lot of mountains where I can practice my climbing skills. Although I must say we will not be climbing too much with all the camping gear on our bikes. We found a perfect route that skirts all the mountain ranges in France but hardly ever enters them. On the days we do not travel, I can climb some mountain nearby and my wife can train for the Marathon van Amsterdam she has planned in the fall.

I’m looking forward to it all and I know I am a little bit crazy to even try it, but that’s just me.





Workflow replacement

1 07 2008

I just saw an interesting post if you have trouble redeploying a process flow. The error you get is something like:

RPE-02062: Itemtype cannot be dropped as it has a running process.

And, yes, that is the link to the post where all the (gory) details can be found. It is documented for 11gR1 but I imagine it will work for 10 and 9 as well.

Links in rather nicely with one of my previous posts. One more thing to look into ….





Parallel processing as a silver bullet

28 05 2008

If you ever need to explain why parallel processing is not always the right solution, maybe you can use The Lawnmowers Law as an analogy for Amdahl’s Law. And I’ll throw in the silver bullet as well. Thanks must go to Doug and ultimately Jared Still for pointing to this article