Oracle Notepad vi

How Can I?
Book Reviews
User Groups

Legal Notice & Terms of Use
Privacy Statement

Blog Archives
Wednesday, December 23, 2009
I am just a few days from beginning my 61st analemma and we are pleased to report that the only disappointment we face is the sad realization that we still can not tell whether Schrödinger's cat is ok.

To all of our many friends and acquaintances around the world: "Thank you." Lets do it again ... in in twenty-ten.
nav varsh ki subhkamna
xin nian kuai le / xin nian hao felice anno nuovo, buon anno
sretna nova godina
gelukkig Nieuwjaar
happy new year bliadhna mhath ur
head uut aastat
onnellista uutta vuotta
bonne année
ein gutes neues Jahr / prost Neujahr yeni yiliniz kutlu olsun
hauoli makahiki hou blwyddyn newydd dda
Monday, November 30, 2009
Well things have calmed down a bit so you can Click Here to view a few pictures from B'ham that were taken after the Speakers' event at All Bar One and later at Thai Edge: both in Brindley Place.

There is no question but that UKOUG is the best Oracle uses group in the world ... nor has there ever been much question that the UKOUG conference is the best conference ... far outshining Oracle's own OpenWorld from the standpoint of serious DBAs and developers. This year UKOUG outdid itself and this was, without a doubt, the best Oracle conference I have ever attended.

Just to give you a sense of why I say that ... review this list of those attending (and I mean no slight or disrespect to anyone not listed below):
  • Alex Gorbachev
  • Bryn Llewellyn
  • Christian Antognini
  • Connor McDonald
  • David Kurtz
  • Debra Lilley
  • Graham Wood
  • Husnu Sensoy
  • James Morle
  • John King
  • Jonathan Lewis
  • Joze Senegacnik

  • Julian Dyke
  • Larry Carpenter
  • Mogen Norgaard
  • Niall Litchfield
  • Pete Finnigan
  • Ronan Miles
  • Steven Feuerstein
  • Tanel Poder
  • Thomas Kyte
  • Tim Hall
  • Tuomas Pystynen
  • Wolfgang Breitling

Bryn Lewellyn
ACE Director
Stanley who
travelled to
from Vietnam
And there wasn't a dull moment with great parties, wonderful meet-the-speaker sessions, and entertainment ranging from live opera with Matt Minter and Lynn Boudreau of "Opera on the Run" to decent scotch everywhere I went.
Wednesday, November 25, 2009
  Some may wish to juxtapose the following:
"If a nation expects to be ignorant and free, in a state of civilization, it expects what never was and never will be."
 ~Thomas Jefferson to Charles Yancey, 1816

"As Putin rears his head and comes into the air space of the United States of America, where - where do they go? It's Alaska. It's just right over the border."
 ~ Sarah Palin September 4, 2008

Others need only look up the definition of the word "Rogue" in a dictionary ... something Ms. Palin obviously has not done or can not do for lack of working synapses.

The title of her book, it would seem, is both accurate and precise.
  Rogue used as a noun:
1: vagrant, tramp
2: a dishonest or worthless person : scoundrel
3: a mischievous person : scamp
4: a horse inclined to shirk or misbehave
5: an individual exhibiting a chance and usually inferior biological variation

Rogue used as an intransitive verb:

to weed out inferior, diseased, or non-typical individuals from a crop plant or a field

Rogue used as an adjective:
1: resembling or suggesting a rogue elephant especially in being isolated, aberrant, dangerous, or uncontrollable
2: corrupt, dishonest <rogue cops>
3: of or being a nation whose leaders defy international law or norms of international behavior <rogue states>
I couldn't have said it better myself
Thursday, November 12, 2009
Today I attended the second meeting of the Western Washington OUG. The new Oracle user group formed here in the Puget Sound area. I presented one of my favorite topics: What Oracle includes in their software, for free, that they don't talk.

It was great to get back together with former students, my many local friends, and a tremendous and welcome surprise ... my friend Sridhar Avantsa (formerly with Pacific NW Bell and A big thank you to everyone that made me feel so welcome.

A copy of my presentation slides can be found [Here] on the presentation's page. It will not, of course, include my lecture notes ... I never have any ... nor the part that was live in SQL*Plus.

Again a very big thank you to everyone and best wishes with your new user group. I have no doubt that with leadership like Jeremiah and Gary things will go well.
Monday, November 09, 2009
I am updating the page on the package SYS.STANDARD today and found the following comment along with the DDL.

  -- ROWID: this dreadful identifier is supposed to represent a datatype
-- outside of SQL and and a pseudo-column (function, to us) when inside
-- a sql statement. ADA data model doesn't allow for any
-- function X return X;
-- so we must special case this. Yuk. There's special-case code in ph2nre
-- which maps "rowid" to "rowid " if we're inside a SQL stmt.

function "ROWID " return ROWID; pragma builtin('ROWID ', 1, 209, 240);
-- this had better never be called.

Maybe it is just me but I can't think of a better way to get a DBA or Developer to try something than a comment like this.

Thursday, November 05, 2009
It is snowing in Helsinki but it is amazingly comfortable here at OUGF where the finest Oracle talent in Finland has gathered.

I was terribly distracted after that first sentence by Heli and a call to Tiina and Bambi, and Rudolph and Winnie the Pooh at the dinner table so I will write more now that I am back in Seattle. For now, though, here are some pictures from Saaga. The bear balls were excellent. I'll leave the rest to your imagination.

Only the Kuksa knows
Friday, October 16, 2009
Please remind me to write something about OpenWorld here .... <g>
Friday, October 09, 2009
The ACE Briefing at the Oracle conference center has been extraordinarily valuable and were it that what I am hearing was not covered by NDA I could write a small book: Perhaps if some of this is formally announced I will write about it. On the other hand we are be briefed on middleware subjects of which I must confess there is less relevance so I opened a new SR and reported a bug involving DBMS_REDEFINITION I will share with you.

The bug qualifies as an irritant and little more but it is an important irritant in that the result created using DBMS_REDEFINITION is different from make the change in the traditional way. Here's the code that will allow you to see this yourself.
  -- the tables
empno    NUMBER(15),
ename    VARCHAR2(10),
hiredate DATE);

PRIMARY KEY (empno);

CREATE TABLE int_emp (
empno    NUMBER(15),
name     VARCHAR(100),
hiredate DATE);

-- the triggers
BEFORE UPDATE OF hiredate ON emp
  :NEW.hiredate := SYSDATE;
END bu1_hiredate;

BEFORE UPDATE OF hiredate ON int_emp
  :NEW.hiredate := SYSDATE+10;
END bu2_hiredate;

-- the redefinition calls
exec dbms_redefinition.start_redef_table('UWCLASS', 'EMP', 'INT_EMP', 'EMPNO EMPNO, HIREDATE HIREDATE');

exec dbms_redefinition.register_dependent_object('UWCLASS', 'EMP', 'INT_EMP', dbms_redefinition.cons_trigger, 'UWCLASS', 'bu1_hiredate', 'bu2_hiredate');

exec dbms_redefinition.finish_redef_table('UWCLASS', 'EMP', 'INT_EMP');

-- retrieve the trigger body source code
SELECT dbms_metadata.get_ddl('TRIGGER','BU1_HIREDATE') FROM dual;

  :NEW.hiredate := SYSDATE+10;
END bu2_hiredate;
Monday, October 05, 2009
I am pleased to share with friends and colleagues the formation of the Western Washington Oracle Users Group.

Tonight the group got together at Oracle's offices for the formation meeting, listened to an excellent presentation by Oak Table Network member Jeremiah Wilton, and elected an eight member Board of Directors.

It is going to be wonderful, again, having an active Oracle community here in the Northwest. Thank you, Jeremiah, for spearheading the efforts. I look forward to presenting a paper worthy of this new group at the November meeting.
Friday, September 18, 2009
I am getting ready for OpenWorld 2009 and, while going through the archives, came across an as yet unposted picture taken at Palisade last year when some friends came to visit. You never know what you may find when you start looking on your had drive.

Thursday, September 10, 2009
English language Library updates are on schedule to be loaded by the end of the month. Then I go back and work through some of the higher-level demos and start bringing in the foreign language content. Tonight I found some errors in the Oracle docs demos of CONNECT BY, fixed mine, and emailed the issue to Oracle so they will get theirs fixed too.

Also enjoyed, again, having a President acting like one and watching an opposition prove it is anything but a loyal opposition. So in honor of Barack Obama's speech to the Congress and the people of the United States we affirm that ....
  We did not come here to fear the future  
~ Barack Obama 9 September 2009
Monday, September 07, 2009
Time for another entry into the trust but verify chronicles.

I spent some time this weekend cleaning out old files and found a usenet post from 1-May-2002 to posted by Pablo Sanchez and referencing an item published to the Ixora News back in April 2002. The operative words in the posting were: "you're incorrect Daniel" so I decided to see if I was, in fact, still incorrect. Here's my quick test to determine if column placement, at the beginning of a table affects performance. I'll let you decide how important column placement is in

SELECT * FROM dba_objects;

set timing on

 SELECT owner
 FROM test;

 x test.owner%TYPE;
  FOR i IN 1 .. 100 LOOP
    FOR trec IN tcur LOOP
      x := trec.owner;

 SELECT edition_name
 FROM test;

 x test.owner%TYPE;
  FOR i IN 1 .. 100 LOOP
    FOR trec IN tcur LOOP
      x := trec.edition_name;

First Column Access Last Column Access
Elapsed: 00:00:16.37 Elapsed: 00:00:16.18
Elapsed: 00:00:16.29 Elapsed: 00:00:16.14
Elapsed: 00:00:16.31 Elapsed: 00:00:16.45
Elapsed: 00:00:16.36 Elapsed: 00:00:16.23

Wednesday, August 26, 2009
the dream lives on

Monday, August 17, 2009
I'm beginning my preparations for OOW 2009 and in reminiscing about last year it occurred to me that I had not shared this video clip so I am doing it now.

If you are looking for any of these these attributes:
  • Zero Latency
  • Infinite Scalability
  • Zero Change
  • Zero Patching
  • Instant Operations
  • Subzero Defects
  • Light-speed and Beyond

Anything, and everything, is possible in the Secret Virtual Office.

Sunday, August 16, 2009
Over the weekend I ran into another one of my videos and thought I'd post the links: Here it is.

I also found the link to my previous Oracle Magazine interview and here it is as well.

Wednesday, August 12, 2009
It was an interesting day to be sure. Sometimes "interesting" is an arrow with flashing lights that translates to "with extreme sarcasm." This wasn't one of those days. We are getting closer to two very important events ... OpenWorld and the release of 11gR2. What can I say that is not covered by NDA? Hmmm. Not much. <g>

I have another photo shoot coming up with Oracle Magazine which is enough information for you to figure out the rest and I am also working on scheduling dates for another live video shoot at HQ.

Are you interested in an early preview of 11gR2 live in SQL*Plus? Well the class is done and ready to present following OpenWorld so you shouldn't have to wait too much longer. Watch for information about the class on the home page.
Tuesday, August 11, 2009
Daw Aung San Suu Kyi
Out of sight ... not out of mind
Thursday, August 6, 2009
Today's chalenge:

Run the following SQL statment.

SELECT segment_name, tablespace_name
FROM dba_segments
WHERE segment_name IN ('OBJ$', 'COL$', 'IND$', 'TAB$');

Surprised by the result? Do you know why it produce the result it does?
Wednesday, August 5, 2009
It seems our profession is destined to be tortured by the promotion of ignorance and a refusal to accept reality.

Tom Kyte spent years beating the drum of bind variables and Tom and members of the Oak Table Network continue to promote education over ignorance with respect to hit ratios, index rebuilds, multiple block sizes, etc. What is it about the NOLOGGING clause that people find so bloody hard to understand?

The Oracle docs are perfectly clear ... perhaps no one actually reads them.

Doc Link 1 Doc Link 2 Doc Link 3

Nothing about eliminating logging for normal DML statements. Nothing. Nada. Zip. Zilch. Nyet. Get over it already. There are only two ways to avoid logging DML. The first is direct load operations. The second is to never issue a COMMIT.

Saturday, August 1, 2009
The summer here in Seattle is hot and so is Oracle. I am getting near the end of my 11gR2 beta testing and while I still can't talk specifics I can talk generalities. Conservatively speaking, something that does not come naturally to me, if could have been named ... this is truly 11g. There are far fewer small incremental changes and a number of very substantive changes that are going to rock the database world in a way that will put both Microsoft and IBM on notice that they are not catching up anytime during the next two decades. IBM's DB2/UDS is so marginalized it is hard to find it on anything other than IBM's own hardware and operating systems and even then IBM's hardware teams have stated quite openly that the new hardware they are selling, especially z10's, are almost all hosting Oracle. Microsoft, on the other hand, is about to release the highly acclaimed Window 7 which is, it appears, nothing more than Vista stripped of a lot of brain-dead functionality that was tacked on in the hope of competing with Apple's Mac. It seems, perhaps, it is just a dumbed down version of Windows Server 2008 but we will know a lot more when we are able to load the production release rather than just late Betas.

Meanwhile, the new 11.2 library is just about done and I have created a new "Oracle Database 11.2 New Features" class. I am starting to set up dates to deliver the presentation, of course live in SQL*Plus, following OpenWorld so if your organization is interested give me a call or drop me an email.

Wednesday, July 15, 2009
I have been fielding a lot of requests to put together a suite of videos of Oracle Database 11g functionality. Videos that meet a number of criteria including:
  • Professional production quality (both video and audio)
  • Source code published here at
  • 11gR1 and R2 New Features
  • 11gR1 and R2 Best Practices
  • Short ... high impact ... targeted at specific functionality and indexed not just by syntax but by how to address business and coding problems
  • Free
Well I didn't want to say anything without first discussing it with our friends in Redwood Shores but can now announce that we have their full support.

I will start filming soon and you will find the new videos published on YouTube and elsewhere in Q4.

Thursday, June 25, 2009
Just back from a day-and-a-half at ODTUG Kaleidoscope in Monterey California where I presented an updated paper on Oracle's Audit Vault technology and participated in an ACE Sundown session with fellow ACEs Cary Millsap, Richard Foote, and Anjo Kolk.

Thank's ODTUG for a great conference, Thank's Oracle for the ACE Program and a special thanks to Justin, Vikki, and Lillian for what they have created and how their efforts have benefited all of us in the international community.

Thanks Bryn for your time and a special thank you to Cary, Richard, and Anjo for the courage to be seen in public with me.

For those of you not fortunate enough to be able to join us in beautiful California please do so at OpenWorld in October and watch for my new video ... shot at ODTUG with Willie Hardie's team. I will post a link to the video when it is release.

The YouTube Video, I am deeply embarrassed but must admit it is undoctored.
Thursday, June 20, 2009
when will we ever learn?

Rest in peace Neda Agha Soltan
  Gotta get down to it.
Soldiers are gunning us down.
Should have been done long ago.
What if you knew her and
Found her dead on the ground?
How can you run when you know?
  Gotta get down to it.
Soldiers are cutting us down.
Should have been done long ago.
What if you knew her and
Found her dead on the ground?
How can you run when you know?
Lyrics from Ohio by Crosby, Stills, Nash and Young
Thursday, June 18, 2009
It's a 2 bug day. My initial reaction when people "find a bug" in the Oracle database is to wonder why they think their lack of reading the docs is Oracle's bug ... well not today. One of them is a small little thing involving timezones and DBMS_SCHEDULER and not of tremendous consequence but the other, originally found by John Awald in a complex environment I have reproduced as a test case and submitted as an SR. Here it is for your viewing pleasure.

Note: I have created this in several versions but, most recently, not been able to replicate it with so perhaps it has been fixed.

UPDATE t SET comm = 100 WHERE comm IS NULL;
UPDATE t SET comm = 100 WHERE comm = 0;


  (empno, sal)
  (:NEW.empno, :NEW.sal);

SELECT empno, val * val FROM (
  SELECT 2 empno, sal/SUM(comm) OVER (PARTITION BY deptno) val
  FROM t)

---------- ----------
2  .666500037
2 2.77592685
2  .187652655
2 3.56790123
2 3.62811791
2  .487780297
2  .141330771
2 3.62811791
2  .141330771
2  .20351631
2  .231556334
2  .081632653
2  .734693878
2  .257999496

14 rows selected.

-- note the results from the trigger created by the dbms_output.put_line
-- statement running the above SELECT statement as an INSERT INTO

(empno, sal)
SELECT empno, val * val FROM (
  SELECT 2 empno, sal/SUM(comm) OVER (PARTITION BY deptno) val
  FROM t)



14 rows created.

-- do the exact same thing but without the ORDER BY clause
(empno, sal)
SELECT empno, val * val FROM (
  SELECT 2 empno, sal/SUM(comm) OVER (PARTITION BY deptno) val
  FROM t)


14 rows created.
Be very very careful.
Wednesday, April 15, 2009
Flying out in a few minutes for Seattle and will be home soon. Chile is a wonderful place and I will expand these blog posts more when I get home and can unload my pics from my camera and collect pics from the others that attended.

Suffice it to say that while rebooking my return flight Delta Airlines again demonstrated their total committment to customer abuse. Next time, Delta, I fly LAN.

Note to the world ... is anybody paying attention? Click Here! This is totally inexcusable. If DBAs were doctors they'd be guilty of malpractice.

Well it isn't so as I get ready to fly back to "civilization" I leave you with a page of pics from Chile.

Tueday, April 14, 2009
I just had a tremendous thrill. Following Graham Wood's excellent database tuning presentation. I co-led a presentation on the ACE Program with Lillian Buziak fresh from here debut as a Polynesian dancer. Lillian did a great job representing Oracle and the program and we are all going to see what we can do about getting Oracle to reimburse at least part of Lillian's expenses as she paid for the entire trip herself.

After our part we invited all of the ACEs in the room to come up to the stage and answer questions and we all had a great time. I'm leaving now for La Serena in the Atacama and will write more soon.

Monday, April 13, 2009
CLOUG is a wonderful group and I predict good things for both Chilean users and the greater Latin American community as they have clearly shown the way to doing it well.

The English language track, of which I was a part, had two excellent real-time translators that made it easy for those of us presenting to do so seamlessly. I will get my slides, and some pictures, up shortly after I return home. But, just to keep everyone from getting ahead of the story, here we are with Gloria Estefan.

Sunday, April 12, 2009
06:30am: Santiago Chile. Finally! What a wonderful site. Immigration is friendly and easy but be sure you bring your hard-cash "blood money," $131 for US Citizens. And they do want hard currency: Chilean Pesos are not accepted. I expected as much and brought three 50's. Better to bring exact change. They really don't like parting with the ones and fives they have but polite and courteous all the while.

Did I mention my love affair with Delta Airlines in Atlanta? Do you think my luggage, even though they swore it had been rerouted and checked through arrived? Of course not. Any sign of competence would ruin their otherwise tarnished reputation.

Now at the Ritz Carlton. Beautiful hotel. Very nice room. The bed is calling to me and I will submit just as soon as I finish the Chivas.

13:28pm: My luggage arrived wrapped in plastic like a mummified cocoon. First change of clothes in three days. Thanks for very little Delta.

Saturday, April 11, 2009
It is just before midnight and Delta, not being able to get me on one of their direct flights to Santiago has flown me to Guayaquil Ecuador where I am changing airplanes to LAN. Delta, operating at its normal level of competence, gross incompetence, couldn't give me a boarding pass for the LAN plane they were putting me on so I had about one hour to get off the plane, go through security, find LAN, get a boarding pass, and get on the plane. The good news is that LAN is as good, and as competent, as Delta is the exact opposite. And just to make sure I trash Delta as much as they deserve their planes are old, in need of repair, and their food little more than edible.

Now let us contrast that with LAN. I am on what looks to be a new clean plane. The seats are comfortable. The dinner decent and they poured me enough Ballantine's Scotch to sink a tumbler, offered more, and refused to accept payment for it. Now this is an airline that will get my repeat business. A few hours of precious sleep and I arrive in Santiago around 5:00am. Thank you Delta. Wait until you ask for a bailout from the Obama Administration. I won't forget this when I send letters to my two Senators (Murray and Cantwell), my Congressman (Richert), and the White House. Hope to see you in Chapter 7.

Friday, April 10, 2009
It is 3:00am Saturday morning and I am sitting in the Crowne Plaza Hotel in Atlanta Georgia. I am not supposed to be here.

I am supposed to be on an airplane to Santiago Chile to speak at CLOUG. But, it seems, a horrific thunderstorm, beautiful from 7 miles up, and some tornados, put me on the ground hours after my plane departed. So what have I learned from all this?
  1. Never, ever, fly Delta Airlines to Atlanta. The "act of god" was beyond their control. Their rudeness and general unhelpfulness were unforgiveable.
  2. Never, ever, fly into Atlanta if you can possibly avoid it. Come to think of it I have never had a good experience in this city. Too hot, too humid, and everyone seems to be suffering from a lack of manners.
  3. Never trust a Crowne Plaza confirmation number. They gave it to Oracle Travel and then claimed it wasn't good (on the phone w/ Oracle Travel).
Tuesday, April 08, 2009
  And, in answer to the inevitable questions, yes I am really that tall, and really that young, and that really is my hair, and no I didn't do the editing, or focus the camera. And yes these are my words ... and I meant every one of them.

Thank you Willie, it was an honor to be asked, and I look forward to doing another for you at ODTUG.
Tuesday, March 31, 2009
You should see the RAC cluster he's got in the sail locker.
Amazing. A lower latency cache fusion interconnect and they'd have won. Next time ... Jumbo Frames.
Sunday, March 29, 2009
I have a nice little boat.
Larry Ellison has a slightly larger and faster boat.

Today I am on Larry's sled doing a podcast for Oracle. I will post the URL if they don't come to their senses and drown me in the lagoon.
Friday, March 26, 2009
I would like to thank Truls Bergersen, Frank Vikingstad, Alice Rossman, and the rest of the fantastic group at Oracle User Group Norway in Oslo for what was not only one the best Oracle conferences I have ever attended but a great opportunity to explore a bit of their country as well.

It all started out at UKOUG in December when Mark Rittman of Rittman Mead asked me if I would like to be part of the English language track at OUGN. He said two things that greatly interested me. First Norway as I had never been there and I will pretty much go anywhere I've never been before. And, second, that the conference was being held on a cruise ship. What could be better? A conference and a vacation. Both Mark and Julian Dyke couldn't make it and, much to the Queen's embarrassment an American was there representing the United Kingdom.

Helen and I arrived in Oslo, via Copenhagen, on Sunday, March 8th, in a light snowstorm and after a good night's sleep set out to explore Oslo. Had dinner with Truls and his lovely Brazilian wife, I mention her country of origin only because she made the wickedest Caipirinas we've ever had. If you've never had a Caipirinhas you need is cane sugar, fresh limes, and a controlled substance the Brazilians call Cachaça. But back to my story: Monday evening we went out to dinner at Lofoten Restaurant in Oslo accompanied also by Danish ACE Director Sten Vesterli. I highly recommend the restaurant for fresh seafood. When you go to Norway, at least as an American you are thinking sardines and herring. Reality strikes quickly. This is a city with world-class restaurants and coffee so good it reminds me of Vienna.

Tuesday we left the hotel in the early morning and went to the cruise ship: The Color Line's M/V ColorMagic. I have a boat. Larry has a bigger boat. OUGN had a ship. A ship complete with elevators that go up to the 15th floor. The conference was held in the ColorMagic's conference facility with both English and Norwegian language tracks. We spent 22 hours making our way to Kiel Germany, spent three or so hours there shopping, and then another 22 hours returning, at sunset under the Øresundsbroen, the longest bridge in Europe.

Following the cruise Helen and I shopped, walked, and museumed, enjoying Norway's many National museums; the Kon Tiki museum among them. The night before we left we had what is, beyond question the best dinner of our lives and we've eaten reasonably well over the years. If you have not yet visited Norway then, quite simply, you can justify the trip if you do nothing else other than have dinner at Statholdergaarden, Oslo. Food better than this just does not exist on the planet earth.
Pictures from Norway
Wednesday, February 11, 2009
Stanley's revenge.
At the Miracle 8th anniversary party ... Stanley lost a food fight ... at RMOUG he took his revenge via this photo from the camera of Debra Lilley.

Next time Stanley ... next time. the humiliation will be complete.