Snuff is book 39 in the Discworld series by Terry Pratchett. In this one Sam Vimes is forced by his wife to go on holiday to his country estate. Being a copper he’s on the lookout for anything amiss and ends up getting involved in more than he bargained for. It’s typical Vimes, typical Discworld and typical Pratchett.
I love how Terry Pratchett manages to state the obvious in a way that makes it sound novel. It’s not just what he says, but when he says it. For example, in one part of the book a rather nasty incident occurs, then he hits you with the line,
“I tell you commander, it’s true that some of the most terrible things in the world are done by people who think, genuinely think, that they are doing it for best, especially if there is some god involved.”
Getting tired of typing and setting your ORACLE_HOME, ORACLE_SID and troubleshooting your . oraenv ?
going/connecting to different client sites with different platforms and server environments sometimes it is frustrating just how long it takes to get a proper SQL*Plus environment
So I always make use of this script
and for every server that I access I just have to do three bits of typing:
Without question the best presentation of the conference for many attendees was Cary Millsap's Monday night Keynote. I know this for certain because they told me so at length, grabbing every opportunity to talk about it for the rest of the week! Seriously, you couldn't talk to anyone over drinks for more than a few minutes for the rest of the week before the subject cropped up. A feature of the conversations was how disappointed those who missed it were. That tells you everything about what those who were there had to say about it!
ORA-04091: table ... is mutating, trigger/function may not see it
We know (and understand) by now that a row trigger cannot read a mutating table, but what's the /function all about in above message text? Well there is a completely different scenario that has nothing to do with triggers, where you can run into this error. I thought to spend a short post on that first, so that you really fully understand that ORA-04091 is your friend. And again in this scenario it prevents you from coding logic that might work differently tomorrow than from what it did today.
Let's quickly show you this scenario. We create the EMP table again and insert some test data into it.
Here’s a simple update statement that identifies a few rows in a table then updates a column where a matching value can be derived from another table – it’s an example of an update by correlated subquery:
update t1 set small_vc = ( select max(small_vc) from t2 where t2.id = t1.id ) where mod(id,100) = 0 and exists ( select null from t2 where t2.id = t1.id ) ;