Archive for the ‘oracle’ Category

You are currently browsing the archives for the oracle category.


Oracle Data Integrator, Oracle XE and JDBC NLS problems

Since I've spent a day breaking through this mess, I'd share my way of getting ODI to work with XE as a repository.

ODI repository creation is sucessfull, but after that Topology Manager and all other ODI modules won't work, throwing "ORA-12705: invalid or unknown NLS parameter value specified" while connecting to XE.

There are 3 java connections to repository in ODI:
1) For Oracle Data Integrator Modules

Unfotunately, I couldn't get ODI to work with correct NLS by changing odiparams.bat as they recommend on Metalink, but downloading latest jdbc driver from Oracle and removing old ones (physically deleting ;) ) from \drivers folder helped with this part.

2) For ODI Agent

After trying in vain with adding "-Duser.language=en" "-Duser.region=US" to odiparams, I've created a new wrapper configuration file (stored in ODI_HOME\tools\wrapper\conf) by copying snpsagent.conf to and adding this options to line

wrapper.java.additional.1=-Djava.security.policy=server.policy

so it read

wrapper.java.additional.1=-Djava.security.policy=server.policy -Duser.language=en -Duser.region=US

reinstalling agent with the new wrapper conf file (you explicitly run 'agentservice -i -s agent_name 20910 new_wrapper') worked.

3) For Metadata Navigator

I've used Apache Tomcat as a Metadata Navigator container. Setting additional java options (the very same '-Duser.language=en -Duser.region=US') for tomcat solved this one.

See related Metalink Note: 471749.1

Oracle BI Enterprise Edition vs Cognos BI

Since I've spent some time working with Oracle Business Intelligence last year, I think I'd write a simple comparison list of strengths\weaknesess of OraBI EE vs Cognos (see post on the same topic by Venkatakrishnan). All of this is imho, of course.

Oracle BI EE Pro's:

1) Aggregate navigation

-- ability to set up aggregate tables in BI EE itself, which gives it 'aggregate awareness' while generating SQL. So if you have monthly sales aggregate you just set up BI metadata accordingly and all reports will target this table for monthly data.
There's no such feature in Cognos metadata setting.
But using this feature arises some questions:
a) whether aggregate definition should be BI-tool specific. A lot of practioners, including Kimball, insist that aggregate navigator should reside at database level so that every tool querying datawarehouse will benefit from aggregate avalaibility. This seems rather reasonable, since every datawarehouse is usually queried by more than one analytical application (BI, datamining, more BI) so you either direct all applications to BI EE, or agree to performance degradation.
b) aggregate tables desynch. When you just update the base fact table, aggregate tables become "out of synch", providing incorrect query results untill they're recalculated. This means that you either can guarantee that nobody will access reports in this period, or you can have incorrect data. Since more&more datawarehouses squezee load windows to reach real-time this problem gains priority.
c) choosing which agregate to use for answering questions. That's what statistics is all about in dbms, knowing number of rows and value distribution (lol). Oracle BI EE has the "table row count" feature (although I haven't seen it affect SQL generation yet, need more examples). But there's no value distribution analysis in there, so it's just one side of the coin (not talking about I\O device speed and other characteristics).

In general, it's recommended to use database-specific aggregate table functionality (Oracle Materialized Views or DB2 MQT) since it solves all the 3 questions given above and usually simplifies ETL process (and sometimes even speeds it up, since databases use their own transaction logs to detect what data has changed and what aggregates should be rebuilt). Too bad indexed views in Ms SQL do not work with aggregate dimensions (there's no way to define dimension hierachies there).

2) Cache management

-- OraBI has really profound cache management facility. You can "cache" any database query to OraBI specific storage structure (cache file), wich will allow subsequent queries to the same table\query to run without actual database request being made. This can greatly speed things up. I especially like the Event Polling Table feature: you add a table, which records when dwh table was last updated. OraBI then reads at given intervals and automatically invalidates old cache entries, based on this table records.
Moreover, if you have OraBI cluster this cache can be shared among servers.

There isn't anything even close in Cognos.

Although I greatly like this feature, I just want to warn about overusing it. It's easy to imagine BI developers boosting performance by adding more&more cache untill OraBI becomes a fully blown aggregate system. And sometimes it's just about 1 aggregate table at the dwh level ) Or about introducing OLAP server in the enviroment )))

3) SQL generation.

It's tricky subject, but for now I like OraBI generated SQL more. But it's "apples to oranges" for sure, since I usually use DMR's in Cognos which encumbers SQL greatly and there's nothing identical in OraBI EE.

Oracle BI EE Con's:

1) Multidimensionality

Cognos has Analysis studio and the ability to navigate hierarchies in both directions (you won't believe it, but in OraBI there's no 'Drill-Up', only'Drill-Down'). And DMR's and analytical functions (but their usage is a bit annoying, as it seems now, hope to write about it later). Anyway, Cognos is way much more 'multidimensionally-ready' than OraBI.

OraBI + Essbase is a work in progress and has a huge number of caveats (some fixed by patches, some not, some introduced). And the only way to use all Essbase functionality is to write direct MDX via Evaluate functions. That's a big problem, since it's hard for us to suggest OraBI on top of Essbase for now (till 11g once again). The only alternative is Visual Explorer, which is a very good tool, but it for top-analysts only (thick client, costly).

2) Metadata model development

Instead of OraBI's 'only-star schema', '3 layers of model' Cognos FM Manager doesn't impose any design principles, which allows more mistakes, but it makes some things way more simple. One of the first things I wanted to do in OraBI was a report using just a single table.  Well that's a really funny exercise (see posts over here) if a star schema is a must.

But the main problem is the lack of API for metadata changing and browsing. There's udml, but it's not supported officially. Therefore all current integration scripts (like adding users, merging repositories and working with hierarchy depth changes) are out of the law. Which doesn't stop anyone, but is pretty annoying.

3) Pixel-perfect reports

Oracle BI Publisher is a specific tool, aimed at generating a huge number of formatted reports, based on XML format definition files. It wasn't a part of Siebel BI, so 'integration stitches' still stand out. It's a nice tool, but it certainly lacks web-interface ) Therefore in Oracle BI there's a deep distinction between a simple formatted report (with lots of possible logic in it) and making this report 'printer-friendly' since for the latter you basically have to start from scratch by opening Ms Word )  This will change in 11g as they say )

Having said all that, I really wait for Oracle BI 11g edition to start using it with Essbase and I kinda like the product as it is for "relational-only" reporting.

I surely wanted to write a simple bullet point list at first )

Back from winter-sleep

Okay, it has been almost half-a-year (oh, dears) since the last decent post on this blog. Russian one has suffered as well, I must note.

Reasons vary, but mostly it's that I've been, you know, busy-busy. As I now start to reflect on it, it's always a point of view thing and a question of self-control and ability to say no )

But enough philosphy, brief recap on what happend while I was out "there" in real world. I'll divide this into two parts (by vendors ))

Read the rest of this entry »

Essbase book

Read Edward Roske and Tracy McMullen's "Look Smarter than you are with Essbase System 9" over the weekend. It's really the best "technical" book I've read over past couple of years. Written in simple and not annoying language, with a lot of humor (I couldn't hold myself when I've read the fight club joke) -- definitely a must-have book for any essbaser out there. Found really helpful, although I knew most of the points already. But, oh my, appendixes rock -- calculator cache explained is a real gift.

And, more important, this book really gives you an overall picture and shows a way to go. DBAG covers every topic with excessive amount of details so you can't see the forest over the trees.

Kudos to Edward and Tracy, it's a fantastic job. I'm waiting for ASO one.

PS: Too bad it wasn't there a year ago. And too bad there are no such books on cognos
PPS: Edward has a blog, as you all know.

Essbase first impressions

Finally got a chance to try essbase out on real data volumes. Building half-a-billion facts cube turned out into something like this:

PS: I have very special attitude to David Lynch's films. A physical one. Just the sight of road running away at "Lost Highway" makes me creepy. It takes me about 5 seconds to identify Lynch's work, as I've found out while watching "Chacun son cinema". Might be camera angle...

Using Oracle Model clause in real-life )

I've been a long-term fan of oracle model by clause, talking about here and there, doing some small&funny examples (like eight queens solution in one select) but lacked some real-life necessity to use it. It always turned out that partition by was enough, or some tricky analytical function was already built-in (like trend calculations I wrote about).
And at last, I've encountered a suitable problem.

Task is quite simple&straightforward: calculate number of periods in which current stock will be sold in a store. Like: today we have sales enough for 3 weeks. That's a very common sales demand analysis parameter (Months of Sales (MoS), Weeks of Sales (WoS), DoS and etc).

Formula is quite simple: Current Stock / Average Sales over some period

But there were some difficulties in my case.
Read the rest of this entry »

Future Oracle BI Architecture by Rittman

Just in case you missed that -- awesome course about on how to cook Oracle BI projects is freely available!!!

Calculating trend lines in Cognos Report Studio and Oracle SQL

I'm more than just emotional right now since I've finally got that bugger of my neck.
To those who're interested in getting trend calculated in oracle -- press page-down once.

Trend line calculation in Cognos.

It's 2008 as my desktop calendar says and it's "Targeted information to a broader range of users " on top of the Cognos website. And there I am with simple requirement to calculate a sales trend line.
Just like in Wikipedia.
You know, there's a Trend function in Excel. Since I don't know when (it's Office 2000 here and it's already deep there). And, moreover, in PowerPlay I'd just clicked forecast and linear regression and voila.
But it's single-scalable-mighty Cognos 8 platform you have to write in yourself.
With an example from Cognos Knowledge base article .
Just that in my case I had a DMR and it didn't work "from the box". And I even don't know what is the "box", since there is no such package as "Great Outdoors Company" in standard samples.
It turned out that I had to change aggregate properties of [value 1 for count] and therefore I doubt that this sample works on DMR's as such.
Works now but it took me nearly 4 days to get it working right (mostly trying to understand how sets work with DMRs).

BI for masses? Easy analytics? Yeah...

Trend line calc in Oracle.

After spending a day trying to do it in Cognos, I've decided to give it a try at a database level.
There's a bunch of more than helpful analytical functions in Oracle:
See full list
And this wonderful article on using them to calculate m and b for whole table.
Then you can encapsulate the whole calculation in one statement, using sub queries. The problem is that if you have only one measurement then SXX=0 and you can't divide by zero, that's what case stands there for.
With Andy's masterly help the final variant turns into something like this:
Read the rest of this entry »

Some link dumping

Essbase is finally supported in Oracle BI. Hooray. From here.
Cognos 8.2 BI sp1 out, gotta give it a try.

Oracle Data Integrator + Jython : How to drop all indexes on table

I'm currently building a warehouse using ODI, so I'll share some findings as it goes. And there's be Cognos BI on top of it and EP is one of the sources, so I'm still close to the roots )

Disclaimer: I'm Oracle & ODI n00b -- there are (?) better ways of accomplishing these tasks and if you can point in right direction, i'd be eternally grateful.

So the task is to drop all indexes on a table before loading data (loading gets significantly faster, as they write in 1st grade textbooks these days). And not to specify every index to drop manually, since index are built by separate package and their names are not passed to loading part.

It can be done rather easy:
1 Get all table indexes from ALL_INDEX table
2 Form a drop command for every index
3 Execute command

Couldn't figure a nice&clear way of doing it via sql procedure, but jython solution is easy. Table_Name is a procedure option telling what table's indexes to drop.

You can put such a step in Knowledge Module and get the option (Drop_Indexes) and use a substitution method getJDBCConnection(Target) instead of specifically writing out connection string to database. And beware of tables with same names -- it's not checked here.

Jython Procedure Code:
Read the rest of this entry »

FireStats icon Powered by FireStats