Life before these features existed…

Some Oracle features are so useful you quickly get to a point where you can’t remember what life was like before them. Three that spring to mind today are the DBA_SCHEDULER_JOB_RUN_DETAILS view, the DBMS_MONITOR package and the DBMS_METADATA package.

When using the new 10g scheduler, the DBA_SCHEDULER_JOB_RUN_DETAILS view provides a history of previous job runs. It’s cool to query this and see how the run duration of particular jobs varies during the course of the day, or between days, allowing you to do trend analysis over time. It’s not rocket science to store this information in a table yourself, but it’s nice that it happens straight out of the box.

The DBMS_MONITOR package is part of the end-to-end tracing available in 10g. It allows you to initiate tracing for one or more sessions, where the sessions are identified using combinations of criteria including: service, module, action, client_identifier or just the plain old sid. The really cool thing about this is that it doesn’t matter how many sessions match the criteria, or which RAC nodes they are running on, they all get traced. You can then consolidate all the trace files into a single file using the trcsess utility so you can use TKPROF as normal. This is way cool!

The DBMS_METADATA package was introduced in Oracle9i to allow you to extract DDL or XML definitions of database objects. Most tools like PL/SQL Developer and TOAD allow you to do this easily, but from the server it was always a pain. I used to spend ages writing and maintaining scripts to do this, and invariably they didn’t work for some features. This package threw all that out of the window. Today a friend asked me how he could dump out a schema creation script and I was in the middle of explaining about DBMS_METADATA when I remembered he works on 8i. Bummer…

I use these things all the time so the thought of moving back to 8i or 9i fills me with dread!

Someone mentioned recently that Oracle 11(xyz) is scheduled for release in November next year. That sounds a little early, but if it’s true I wonder how long it will be before I’m saying, “I’d rather quit than work with Oracle 10g!” πŸ™‚

Cheers

Tim…

You gotta laugh…

Funny things I’ve spotted this morning include:

It’s good to see that Microsoft are helping the open source community by not having a clue how to write a proper server operating system, and who would have thought a thong could save your job πŸ™‚

Cheers

Tim…

An encounter with the law…

Last night I finished Karate and went out to meet some friends at a bar. I parked my car in the bar’s car park and spent the rest of the evening there. When it came time to leave we decided to go back to one guy’s house just round the corner, literally 200 meters away. I didn’t want to leave my car in the car park at closing time so I drove it out of the car park, turned left on to the main road and instantly turned right at some traffic lights and that’s when I noticed a police car behind me with it’s lights flashing. I pulled up, right outside my mates house, got out of the car and walked towards the police car (we’re allowed to do that in the UK πŸ™‚ , at which point a Woman Police Constable (WPC) got out of the car and this is the conversation I had:

Me: Hi dude! (not the best opening line on reflection…)
WPC: Dude?
Me: Is it OK to park on these double yellow lines while we do this?
WPC: That’s OK for now. What’s your name?
Me: Tim Hall.
WPC: What?
Me: Tim Hall.

She wrote down my name and the registration of the car.

WPC: Are you the registered owner of this car?
Me: Yes.
WPC: Do you know why I’ve pulled you over?
Me: I don’t have a clue, but I’m guessing you’re going to tell me that I wasn’t allowed to turn right at that junction.
WPC: That’s right!
Me: If that’s the case why isn’t there a sign?
WPC: There is, do you want to see it?
Me: Yes. It’s not that I don’t believe you, but I can’t believe I missed it if it was there.

We walk back to the junction, passing my friends who burst out laughing when they see I’ve been pulled over by the police.

WPC: See that sign?
Me: OK. Your right. Fair enough.

We walk back to the car. My friends are standing on the other side of the road watching the events, all still laughing and obviously drunk.

WPC: Have you had a drink tonight?
Me: No.
WPC: Not one?
Me: No. I don’t drink. Do you want to test me?
WPC: No, that’s OK.
Mat (a friend): Do you want to come inside for a cup of tea love?
WPC: Do you live round here?
Me: Yes, I live at …
WPC: I guess you normally turn left at that junction then.
Me: Yes.
WPC: Well, you did an illegal right turn and you drove through a read light!
Me: Wait a minute, there was no way I went through a red light.
WPC: OK, it just turned amber, but amber means stop unless it’s dangerous to do so.
Me: Fair play, but give me a break on that one.

A male officer gets out of the car.

Me: Hi dude! (Not a great line the second time round either!)
MPC: Smiles, but says nothing.
WPC: OK, be careful in future and have a good night.
Me: Aren’t you going to give me a ticket for the right turn?
WPC: No.
Me: Nice one. Cheers. Have a good one.

Both police officers get back in the car and drive off, I wave as they go by and pull my car into my friends drive. When I get in the house nobody can believe I didn’t get a ticket, or at least a caution!

Am I the luckiest guy alive or what?

I taught a couple of Yoga classes today and recounted the story at the end of the lessons because my reaction to the situation interested me. I’ve been driving cars for about 19 years and in that time I’ve never had a parking ticket, speeding fine or any sort of legal issue along those lines. When the police car pulled me over I wasn’t sure how I should feel about the situation. I knew I didn’t want a ticket, but I also knew there was nothing I could do to stop it, so I just thought, “relax and go with the flow!”, which I did. The whole encounter was very pleasant. Although I knew I didn’t have any control over the situation, the lack of control didn’t phase me. Maybe the calm nature of the encounter helped me avoid the ticket, maybe they just had “bigger fish to fry” on a Friday night at closing time.

One of the ladies at Yoga has recently had stomach cancer and today was here first session back since an extensive operation to remove it. At the end of the lesson she came to me and said, “Your right. Sometimes you just have to admit to yourself that you can’t control everything that happens in your life. Once you understand that, things are much easier to cope with.”

A valuable lesson. I hope I remember it next time something happens to me.

Cheers

Tim…

RAC Success Story…

Yesterday I did an new installation of 10g RAC on a 2 node Tru64 cluster. It was totally clean, unlike the 9i to 10g upgrades I’ve done before.

Once the software was installed I had to create a copy of our current production system on it from an RMAN backup done using HP Data Protector. The whole restore and recovery went through without a hitch.

Days like that restore your faith in Oracle, and your backups πŸ™‚

Cheers

Tim…

10g CRS restart after power failure, feature or bug?

In 10g RAC the Cluster Ready Services (CRS) software is installed in it’s own $ORACLE_HOME, for the sake or argument let’s call this $CRS_HOME. In this directory there are a number of subdirectories including:

  • $CRS_HOME/crs/init
  • $CRS_HOME/css/init
  • $CRS_HOME/evm/init

When the CRS daemons are running these directories contain an assortment of files with names like:

  • myserver.mydomain.com.pid
  • .lock-myserver.mydomain.com
  • myserver.mydomain.com.lck

When CRS is shutdown cleanly these files are managed such that CRS will start up again without manual intervention, but when there is a power failure on one or more nodes the files aren’t cleaned up. The affect of this is that the CRS daemons won’t start properly until you manually clean up the mess.

RAC is a high availability solution, but it is crippled by a power failure. Is that a bug or a feature?

Note. I’m talking about the way CRS (10.1.0.3.0) works on Tru64. I’d be interested to know if it’s the same for CRS on other platforms. Also, I believe some changes have happened to the startup and shutdown of CRS in 10.1.0.4.0, but that’s not released for Tru64 yet, and a recent message on a HP forum suggests that Oracle will skip this patch and wait for 10.1.0.5.0 for Tru64.

Fun, fun, fun…

Cheers

Tim…

Rebrand and all the bugs disappear…

So OCS 10g has been released and it’s “a member of the Oracle Fusion Middleware family of products”.

Let’s hope that during the upgrade to DB10g and AS10g they actually thought about the stability of the product, not just packing in more functionality that most people won’t use.

The next hurdle for me is getting the people here to buy in to an upgrade. My feeling is that the current verison is so bad, what have we got to lose! I don’t think they’ll see it that way πŸ™‚

Cheers

Tim…

Book, Linux, Illusion and Cinema…

OK. I’ve had a small blogging holiday so here’s a quick update:

Book
Over the weekend I finished the first draft of the new book. It’s now off to tech-edit, then copy-edit and it’s done. I didn’t realize how much pressure I had put on myself with this book until I was done. I’ve been really busy and adding to my workload was not a great idea, but it’s done now and I’m pretty happy with it so far. Let’s see what the comments are like πŸ™‚

Linux
I’ve been using Windows XP recently as I killed my main Linux box during an FC4 upgrade. Until this weekend I didn’t have the time to fix it, so I was left with only my Windows XP. It’s been ….. Real…

Anyway, I decided to give up on FC4, I’ve done a few installs and upgrades and there have been issues with all of them. Instead I’ve opted for CentOS 4.1, a clone of RHEL 4.0. I’ve used the latter at work and it’s been pretty cool. I was a little worried about using a clone as I thought there would be some issues with it, but it installed with no issues and even did an up2date without any problems. I’m a CentOS guy all the way now πŸ™‚

The main reason for picking a RHEL clone was that I wanted a stable base for all my virtual machines. Every kernel update on FC4 filled me with dread because they kept breaking VMware. Sometimes it would recompile, sometimes it wouldn’t πŸ™

The next plan is create a new virtual machine and install Oracle 10g Release 2 in it again. I haven’t done too much with this release, apart from install it on a number of Linux releases. I guess I might go CentOS for this VM too πŸ™‚

Illusion
I found this – The Amazing Dots…

Cinema
I went to the cinema yesterday afternoon to see “The Cave”. Anyone who read my review of “The Descent” will know I discovered I was claustrophobic whilst watching that film, so going to watch another film about caving, but this time underwater caving, didn’t sound too clever…

Apart from one scene, there were no really claustrophobic moments, but there were loads of really cool underwater shots. From a visual point of view the film was great, but as a whole it was a bit lame. It laid its cards on the table too early, which meant there was almost no suspense. Never mind…

Cheers

Tim…

My OCS Hell…

I don’t know if you know this, but I hate Oracle Collaboration Suite (OCS). It is the most useless pile of camel dung I’ve ever cast my eyes upon. It’s really is not worth the price of the CDs it’s delivered on.

Yesterday it crashed in the afternoon so I restarted it all (DB, infrastructure and 3 middle tier servers). By the time I got home it had gone again, so guess what I had to do… Restart the lot again. About an hour later it had gone again, but I wasn’t at home so a collegue had to do the honours. My last text message on the subject was a little after 22:00. This morning I get to work and (can you guess what’s coming next?) it has all crashed again. At least it’s consistently rubbish!

My only hope is that my company give up on it, rather than wait for Oracle to fix it, because I know Oracle will focus on adding more gimics to it, rather than getting it to work properly.

My advice to anyone contemplating using this product is DON’T!!!!

If you are forced to use it, like me, consider hiring people to cover a 24 hour reboot service!

Cheers

Tim…

Article accepted for IOUG SELECT magazine…

I got an email yesterday saying that an article of mine has been accepted for the IOUG SELECT magazine. The article is a small section from the book I’m currently writing, which should be finished by the end of this month. I’m not sure when the article is going to be published so watch this space…

I’m looking forward to finishing the book and getting my teeth stuck into Oracle 10g Release 2. I’ve been so busy recently that I’ve not had much time to check it out, and as a result I’ve not been adding many new articles to ORACLE-BASE.com. A situation that will be rectified soon πŸ™‚

Cheers

Tim…

Unleashed and on the net again…

I went out this morning and bought a new wireless ADSL router, so I’m back on the internet from home. I guess this means I should do some work πŸ™‚

Unleashed
I went to the cinema last night and watched the new Jet Li film Unleashed. Now I think Jet Li is possibly the most complete martial artist that ever lived, but let’s face it, most martial arts films are really poor. The new breed of artistic high-budget films like Crouching Tiger, Hidden Dragon, Hero and House of the Flying Daggers are great, but they’re more spectacle than martial arts. Unleashed is different. It’s perfect!

The story:
It was written by Robert Mark Kamen and Luc Besson. It’s very different to anything else I’ve seen and works really well. Bart (Bob Hoskins) is a debt collection and general gangland type. He systematically brutalizes Danny (Jet Li) from a young age until he is capable of nothing more than responding to instructions like a dog, even wearing a collar. Bart uses Danny as the ultimate weapon against debtors who don’t pay, because when the collar is taken off his passive nature is replaced by complete rage. But is there more to Danny than violence?

The acting:
Morgan Freeman is always great, but Bob Hoskins has returned to form in a big way. It’s like a flashback to the days of “The Long Good Friday”. Jet Li is totally believable as his character Danny. The other characters do their jobs well also! It’s set in Scotland so there are some very “regular” British characters in the film. I like this, but I don’t know how it will translate for the rest of the world who seem to assume that everyone over here talks like Hugh Grant πŸ™‚

The action sequences:
These were directed by Yuen Woo Ping, so I shouldn’t need to say anything, but I will.

The fight scenes are gritty, dirty, brutal and show Jet Li at his best. The combination of power, technique and uncontrollable rage is truly a sight to behold. I came away thinking, if Jet Li and God had a fight, God would lose! In my opinion, that’s what a martial arts film is all about.

I love this film! I will definitely go to see it at the cinema again and I will buy it on DVD as soon as I can.

Cheers

Tim…