Tuesday, May 31, 2011

A Baseball Ouch

I was driving home through Gainesville from Atlanta on Saturday when I decided to see if I could pick up UF's baseball game (SEC Championship). I did, first inning and the Bulldogs (Georgia) had just scored a run. With a runner on first the pitcher throws home, the runner takes off for second and the catcher throws...and hits the pitcher square in the back of the head knocking him out.

At that point, the Florida announcers start talking about the 2 Georgia players who are now wheelchair bound, one in a motorcycle accident last year and one in an on-field collision with a teammate this year. I'd have to say that the announcers got a little carried away with the drama of the moment.

Anyway, I've seen guys get hit before, perhaps I've been hit, I can't remember, but I've never seen something like this.



The pitcher appears to be OK, he suffered a mild concussion...a scary moment but he seems to be OK. Had to be hard on the kid that hit him too, who was just announced as a finalist for the Golden Spikes Award as one of the premier college baseball players in the country.

Monday, May 30, 2011

BI Forum: Masterclass

I spent last week in Atlanta, GA for the first ever BI Forum state-side.

I tend to write a lot during these events, but since I decided to rebuild my laptop the day before I went, I hadn't worked out all the kinks (specifically my wireless adapter), I hardly used the thing. I spent the majority of time on "my" table, the Motorola Xoom. Since getting this device, my son has owned it...which appears to be the norm in most households with young children.

Day 1, technically Day Zero
This was a Masterclass by Mark Rittman (@markrittman) and Tony Heljula (Hallelujah!) (@aheljula).

Mark was up first and spoke about OBIEE 11g Architecture and Internals (pdf). It was nice to get a big picture view from the architecture side from someone who has been working with the latest release for quite some time. From my understanding, this is the very first Fusion-like app released...but I could be wrong. Mark ran long, everyone had lots of questions which Mark graciously answered.

Big Side Note
Please bring an extra liver to these types of events, especially if you have a number of people from the UK in attendance. I have a beer or 3 regularly, but this is just nuts. I declined invitations to go out too (which got me quite a bit of ribbing). My roommate, Jason Baer (former colleague and now RM employee) was ruthless. He'd roll in around 3 AM, wake me up, give me a hard time and then get up before me, shower and dressed before I even woke up. I'm getting old.

Next up was Tony Heljula. I had never even heard of Tony before that day...either I'm losing my touch or he's hidden himself somehow on the European Internet.

BTW, you don't pronounce his name Hallelujah, but I do now. It is easier to remember.

Tony spoke after Mark on the Spatial and Mapping Integration in 11g. I've used neither of these components; the Map Viewer in OBIEE nor the spatial stuff built into the database. Very, very cool things you can do there.

Lunch. No beer. Thankfully.

Mark was up again on OBIEE 11g BI Server New Features and RPD Modeling. To summarize some of the new features:
- ID Columns for Descriptive Columns ("Double-columns")
- Lookup Tables (Yeah!)
- Support for Ragged, Skip-Level and Parent-Child Hierarchies
- Hierarchical Subject Area Columns
- LTS Priorirty Ordering
- Repository Passwords
- Deployment of Repository Files using FMW Control

I've followed the Rittman Mead blog closely since the release of 11g, so not much of this was new to me, but it was fun to see Mark speak for the first time.

To end the day, Tony spoke on SOA integration. You might wonder WTF that has to do with OBIEE...I did, at first. As he worked through his example though, it made perfect sense. The question I didn't get to ask was whether SOA was the way forward and the OBIEE write-back functionality would be deprecated eventually...I'll get an answer to that shortly I hope. Read Tony's presentation here.

For all the presentations, both in Brighton and Atlanta, check out Mark's post today.

Great first day...it had been some time since I could just relax and take-in the presentation without worry of blogging right after, which was nice.

Brighton is on year 3, this was the first event in Atlanta. Here's to making this an annual event.

Saturday, May 21, 2011

Update Connection Pools in OBIEE 11g

This is not rocket science, but I've had to document this a number of times so that the production/operations/DBA team(s) can go in an update the password. I'm tired of redoing it every time.

After logging into the production server that contains the client tools, go to Start ==> All Programs ==> Oracle Business Intelligence and select the BI Administration tool



That will open up a shell window and eventuall the BI Administration tool will pop up.

Select File ==> Open ==> Online



A challenge screen will then be opened:



Enter the Repository Password, User and Password

You'll then be greeted with the metadata for the online repository.



There are 3 layers to an OBIEE metadata repository:
- Presentation
- Business Model and Mapping (BMM)
- Physical

You only need to worry about the physical.

The arrows in the above picture point to the objects that you will need to modify, the Connection Pools.

Double click on the Connection Pool you need to update. You'll be asked if you would like to check it out.



Select Yes.

Now the important part. The Connection Pool properties box will open up. Make sure you are on the General tab and then locate the Password text field.



Enter the password for the specific user into the Password text field.

When you hit OK, you'll be prompted for the password again.



Enter it and hit OK.

Repeat this step for each of the Connection Pools in the environment. Each physical database has one or more Connection Pools, so you must update them all.

Now you must Check in your changes and then Save them.



After hitting the Check in button and the changes have been, checked in, that button will become grayed out. When that happens, click on the Save button.

These changes will be immediately applied to the repository.

Tuesday, May 17, 2011

The Zone

By Enrique Aviles

When was the last time you were in "the zone"? I'm talking about that special moment when you are able to construct a mental representation of a complex task with none of its parts missing. You've managed to take a large problem and break it apart into smaller pieces that you fully understand thus giving you a clearer picture of the original bigger problem. At this stage you are completely focused, ideas are flowing, and you feel confident what seemed like a daunting task is now under your control. This mental state is typically associated with programming or software development but it applies to pretty much any task that requires deep focus and concentration. Programmers in the movie The Social Network were known to be "wired in" when they were in the zone



For me, this is usually achieved when I'm alone at work or at home. The seating arrangement at work is great for collaboration since I share cubicles with three colleagues but makes it almost impossible for me to get in the zone.

Recently I had to optimize a large query that feeds a Crystal Report. Notice I said query, not queries, so all the data was gathered with a single query. This query was actually a UNION of several queries each joining tables, views, inline views, and a few IN clauses. It wasn't until I was able to enter the zone that I managed to make significant progress troubleshooting the monster query and develop a solution that made a significant impact.

What are some of the hurdles that prevent us from entering the zone? Are they limited to the office? Perhaps it is better to work from home, but is that even a plausible option? Emails, phone calls, instant messaging, impromptu meetings, people asking for help and casual conversations make it very difficult for someone working on a complex task to enter the zone. Working from home could aggravate the issue since the only means of communication are limited to phone calls, emails or instant messages. Nobody knows how busy you may be so interruptions might occur more frequently than if you were in the office.

How do you find the zone? As with everything else this could be a matter of personal preference. Some people (like me) prefer silence and virtually no external stimuli while others are content and strive in the midst of chaos. Regardless of what your style may be one thing is certain: it is almost impossible to achieve deep concentration if one is frequently interrupted. Unless you possess special mental abilities that allow you to context switch as quickly as a modern CPU, most everyone requires a special setting and the right conditions in order to enter the zone.

The average IT professional would be more productive and enjoy greater job satisfaction if he/she is able to enter the zone more often. We would be able to develop better designs, troubleshoot more efficiently, and devise smarter solutions. Entering the zone is a rewarding experience not only because it helps us solve complex problems but because it shows us the level of mental prowess we are able to attain.

Wednesday, May 11, 2011

Suppress Output in SQL*Plus

A friend of mine IM'd me asking if there was a way to supress the output of a query in SQL*Plus. I imagined what he was looking for was similar to what SET AUTOTRACE TRACEONLY does...without all that output.

Off to my local instance.
SYS@TESTING>SELECT * FROM dual;

DUM
---
X

1 row selected.
How about (I swear, this was the first one I tried), SET TERMOUT OFF. That didn't work. (Now guessing) SET ECHO OFF? Nope.

To recap, I want to mimic the behavior of SET AUTOTRACE TRACEONLY where there is no result provided AND I don't want all that other stuff.
SYS@TESTING>SET AUTOTRACE TRACEONLY
SYS@TESTING>/

1 row selected.

Elapsed: 00:00:00.03

Execution Plan
----------------------------------------------------------
Plan hash value: 272002086

--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 2 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| DUAL | 1 | 2 | 2 (0)| 00:00:01 |
--------------------------------------------------------------------------


Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
3 consistent gets
0 physical reads
0 redo size
418 bytes sent via SQL*Net to client
419 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
How about The Twitter Machine?

@mgralike, @hillbillytoad, @nlitchfield, @boneist and @dhaimes all jumped in the fray. @hillbillytoad was definitely the most difficult (as usual).

I'll use Storify to tell this story again (so I don't have to screenshot each and every message, in order, and put them in this post).



So the end result?

Create a script, call it test.sql. Put your query in there. From SQL*Plus, issue SET TERMOUT OFF and then run your script. Magic!
SYS@TESTING>SET TERMOUT OFF
SYS@TESTING>@TEST
SYS@TESTING>SET TERMOUT ON
SYS@TESTING>/

1
----------
1

1 row selected.

Elapsed: 00:00:00.02

Dream Job

I saw it posted somewhere recently but I can't remember where.

I originally thought it would be something technology related, but I recently procured myself one of these:



See it in action here:



As a pitcher, I spent a lot of time doing nothing. Take a 3 hour practice. I throw for about 10 or 15 minutes, maybe a little bullpen work, I'm up to 25 minutes. Maybe some PFP (pitchers fielding practice), 40 minutes now. I might be asked to be a runner in situational practice, 1 hour. That leaves 2 hours. That time is spent shagging baseballs during batting practice (BP). While it can be fun, it can also be incredibly boring, especially if you're stuck on home run duty (all alone across the street).

I fought that boredom by becoming really good at hitting ground balls to infielders during BP. Freshman year, coach had wooden fungo bats. He wouldn't let anyone use them because we might break them. What did I do? I used them. I didn't break them either.

The pinnacle of being good with a fungo bat is probably the ability to hit pop-ups for the catcher, you know, the ones straight up that curve back towards the field. I can do that.

I've been hitting fungo to the 7-8 year olds where I'm the assistant coach. Sometimes I'll hit them hard, mostly soft, but I just remember how much fun it was.

Wait, one more thing to go along with that. BP pitcher. I throw great batting practice (I'm not sure if that's was a good or bad thing career wise, obviously doesn't matter now). It's fulfilling to be able to throw strikes and see how far people can hit them.

There it is, my dream job. Fungo hitter and BP pitcher.

I wonder if the Rays are hiring and if they'll pay me enough to support my family?

Monday, May 9, 2011

ODTUG Kscope 11: Tools Tools Tools v2.0

A couple of weeks ago I wrote about the cool Sunday Symposium I have been allowed to put together for KScope11.

Well, someone had to back out. I won't mention names, but they didn't really verify the time and dates. Said person had the audacity to take a vacation!

I wasn't going to name names, but I will, it's Jeff Smith, aka @HillbillyToad.

I'm not really mad (just don't tell him, I like to keep him on his toes). I like Jeff's presentation style a lot, he came down and spoke to our user group about a year ago. He makes me almost want to use Toad. Almost.

Anyway, since he couldn't speak, I had to find another speaker.

Hmmm...

Ideas?

Wait, I heard there was a big name attending last week didn't I?

That's right, none other than Mr. Thomas Kyte.

Maybe he would "fill in" for Jeff?

As is my mantra, the worst thing anyone can say is "No."

So I asked, and he accepted (and I must find a gift for his wife...).



So to recap:

Cary Millsap will be kind of a facilitator. Kris Rice will be speaking twice. Robyn Sands, Sten Vesterli, Sue Harper, Marc de Oliviera and finally the Dominic Delmolino. Wow. It's gonna be a great day!

Wednesday, May 4, 2011

The &DBA

Pronounced, Ampersand DBA.

I'm hearby naming all my future DBAs that meet certain criteria, &DBA.

Over the years, at about a million different organizations, I have met many DBAs. Many, at first glance, fit the DBA stereotype; cranky, condescending, arrogant, etc. After further review, many of those traits still apply. Some however turn out to be the opposite; they just put on a game face for the new guy or gal because they've been through this before...probably to be disappointed again that the developer will 1, leave them out of design discussions 2, throw bad SQL over the wall, 3, not use bind variables, ever and 4, well, all the other bad things we developers do.

The type that I have least encountered are the DBAs who actively seek out and engage developers. Hey, can I help you with that? Hey, you aren't using bind variables, here are the reasons you should. They know that in the long run, the better the developer, the easier their job will be.

I love that aspect of my job. I like helping others learn to do something better or more efficiently. I like to encourage others to download and install the database. But that's not the point of this post...

I needed a name for those DBAs who are 1, less qualified than I am to be a DBA (short list, I am under no illusions), 2, are wholly incompetent and 3, are jerks.

After a recent incident, as relayed by others, the &DBA was born.

What does the & mean?

In SQL*Plus, the & is a special character. If you run scripts you can parameterize them with &COLUMN_VALUE or something, right?

That's great for scripts.

It can go horribly wrong with code. At least the first time you try to load code via SQL*Plus. Here's the original
CREATE OR REPLACE
FUNCTION foo RETURN VARCHAR2
AS
l_retval VARCHAR2(10);
l_value VARCHAR2(30) := 'Barnes & Noble';
BEGIN
SELECT 'IT WORKS!'
INTO l_retval
FROM dual
WHERE 'Barnes & Noble' = l_value;

RETURN l_retval;

END foo;
/
show errors
and here's what happens when I run it:
CJUSTICE@NO_CLUE>CREATE OR REPLACE
FUNCTION foo RETURN VARCHAR2
2 AS
3 l_retval VARCHAR2(10);
4 l_value VARCHAR2(30) := 'Barnes & Noble';
5 BEGIN
6 SELECT 'IT WORKS!'
7 INTO l_retval
8 FROM dual
9 WHERE 'Barnes & Noble' = l_value;
10
11 RETURN l_retval;
12
13 END foo;
14 /
Enter value for noble: show errors
old 3: l_value VARCHAR2(30) := 'Barnes & Noble';
new 3: l_value VARCHAR2(30) := 'Barnes show errors';
Enter value for noble: testing
old 8: WHERE 'Barnes & Noble' = l_value;
new 8: WHERE 'Barnes testing' = l_value;

Warning: Function created with compilation errors.
This is how it is stored in the database:
FUNCTION foo RETURN VARCHAR2
AS
l_retval VARCHAR2(10);
l_value VARCHAR2(30) := 'Barnes show errors';
BEGIN
SELECT 'IT WORKS!'
INTO l_retval
FROM dual
WHERE 'Barnes testing' = l_value;

RETURN l_retval;

END foo;

12 rows selected.
Yeah, that won't work.

To fix this, you simply set an attribute/directive? in your SQL*Plus session, SET DEFINE OFF (I believe there is another, but this is the one I use). Like this:
CJUSTICE@NO_CLUE>SET DEFINE OFF
CJUSTICE@NO_CLUE>
CJUSTICE@NO_CLUE>CREATE OR REPLACE
2 FUNCTION foo RETURN VARCHAR2
3 AS
4 l_retval VARCHAR2(10);
5 l_value VARCHAR2(30) := 'Barnes & Noble';
6 BEGIN
7 SELECT 'IT WORKS!'
8 INTO l_retval
9 FROM dual
10 WHERE 'Barnes & Noble' = l_value;
11
12 RETURN l_retval;
13
14 END foo;
15 /

Function created.

Elapsed: 00:00:00.22
CJUSTICE@NO_CLUE>show errors
No errors.
CJUSTICE@NO_CLUE>
CJUSTICE@NO_CLUE>SET DEFINE ON
All is now well in the world.

Now this might be vexing on your first couple of weeks on the job, but you quickly pick it up.

This is where the name comes from...

SET DEFINE OFF
&DBA
SET DEFINE ON


said that this was a known Oracle bug.

Really.

SOUG: Cary Millsap

Performance related topics are trending this year at SOUG. By trending, I mean 2 of 7. That's a trend right?

In January, we talked Tanel Põder into taking a vacation from his vacation. Now, we get Cary Millsap of...well, fame.

If you don't know who Cary (@carymillsap) is, you should. From his blog:

Oracle performance specialist since 1989, author of "Optimizing Oracle Performance" (O'Reilly), founder and president of Method R Corporation.

Hmm...I thought he had Teacher in there. Here it is from his Google Profile:

Oracle performance specialist, author of Optimizing Oracle Performance with Jeff Holt. Founder and President of Method R Corporation. Teacher, consultant, software designer and developer.

I really like that, Teacher. Teaching.

Teachers need to understand a subject enough to convey its essence to students. While traditionally this has involved lecturing on the part of the teacher, new instructional strategies put the teacher more into the role of course designer, discussion facilitator, and coach and the student more into the role of active learner, discovering the subject of the course. In any case, the goal is to establish a sound knowledge base and skill set on which students will be able to build as they are exposed to different life experiences. Good teachers can translate information, good judgment, experience and wisdom into relevant knowledge that a student can understand, retain and pass to others. Studies from the US suggest that the quality of teachers is the single most important factor affecting student performance...

Like Tanel, I don't understand many of the finer details, I do not have that kind of experience. What makes Tanel, and Cary, stand out, is that they can make these complex topics easily consumable by mortals.

Sign up details are here.