Saturday, April 30, 2005


I was reading around the web and read an article that was talking about the EXCEPTIONS INTO clause – a feature whereby when you enable a constraint, Oracle will record the rows that do not pass the constraint check into an exceptions table. It works with unique, primary key, check and so on. The article seemed to be indicating “exceptions into was broken” – but it seemed more likely to me, that this was a case of not understanding how it actually works.

So, I contacted the author and we had a back and forth email exchange. Basically, they came back with “the documentation isn’t good enough, this could really hose someone up”. Well, I’d like to do a poll. I’m curious. What I’d like you to do is read the documentation, the SQL Reference guide had this to say:


Specify a table into which Oracle places the rowids of all rows violating the constraint. If you omit schema, then Oracle assumes the exceptions table is in your own schema. If you omit this clause altogether, then Oracle assumes that the table is named EXCEPTIONS. The exceptions table must be on your local database.

And the Admin Guide had more. Now, after reading that (don’t run the example! Just answer the poll based on the reading or your past knowledge of using this command), can you fill in the blanks of this example? We insert two rows into T with the same value – when we enable a primary key with exceptions into, how many rows will be “exceptional”?

ops$tkyte@ORA10GR1> create table t ( x int );
Table created.
ops$tkyte@ORA10GR1> create table exceptions(row_id rowid,
2 owner varchar2(30), table_name varchar2(30),
3 constraint varchar2(30));
Table created.
ops$tkyte@ORA10GR1> insert into t values ( 1 );
1 row created.
ops$tkyte@ORA10GR1> insert into t values ( 1 );
1 row created.
ops$tkyte@ORA10GR1> alter table t add constraint t_pk primary key(x)
2 EXCEPTIONS INTO exceptions;
alter table t add constraint t_pk primary key(x)
ERROR at line 1:
ORA-02437: cannot validate (OPS$TKYTE.T_PK) - primary key violated
ops$tkyte@ORA10GR1> select count(*) from exceptions;


Warning: The following poll will display to you advertising which is totally unrelated to this site:

After reading the above example, how many rows will be in the Exceptions table?
More Than 2

Free polls from
I give a presentation on “Things you Know”, sort of a fun keynote type address. I used part of it the other day in the things you know blog – I’m going to use the opening slide here as it is very relevant to this. Actually, the opening slide comes from asktom – the writer (Gabe) was mentioning that unless you took the time to understand the implementation of a snippet of code another reader had posted – bad things would happen, it was a bug waiting to happen. The slide I have looks like this at first:

Quote of the Day….

Not that anyone should care by now (we are in 10g times after all) ... but that "Hierarchy" package presented last year as a 8i method for doing what sys_connect_by_path does is a bug waiting to happen. One needs to understand how it works in order to use it safely.

I thought – how perfect, that sums up a lot of things. I use this slide in a build – the last line morphs into:

One needs to understand how Oracle works in order to use it safely.

But I thought – hey, that makes Oracle sound “special”, so the slide morphs into:

One needs to understand how ANYTHING works in order to use it safely.

There we go. Unless you understand a command, have read the documentation, have tested it, have tried it – you probably don’t get it. Understanding comes from

  • Reading
  • Testing
  • Implementing

To assume something is broken because it didn’t work the way you thought it should is wrong. And, given this person had at least as many years experience with Oracle as I did, goes to show – if you want to provide advice, back it up, show what you say is true. We now have another piece of material on this thing called the internet with a myth on it. Because someone had never used a command before, didn’t read the documentation on it, and assumed how it should work – given the problem he had to solve. Recipe for disaster.

Friday, April 29, 2005


From Starting at Oracle in 1993, how did you get to where you are now. What did you start of as and how did your career in oracle progress

How... By doing things I didn't really want to do at first.

I do lots of talks now, but before 1993, I hadn’t done many (many being virtually the same as “none”). One of my first big talks was at IOUG in 1994. It was in Florida (hey, I’ll be there on Monday, deja-vu). I had the first technical session of the week. The room sat around 1,500 people and it was mostly full. My presentation was on “server side exits in forms”. If you are an old time forms program, you remember “user exits”, you could link in code written in C and call it from forms. This was the same concept, only the code ran on the server (it was external procedures in version 7, I wrote it, it actually had an Oracle part number. You could order this thing and get it shipped to you. I still have the shrink wrapped package).

Well, anyway there I was scared to death of public speaking (still am to some degree, love/hate relationship). I would get physically ill – and seeing that many people in room, I was in really really bad shape. I had a 30 minute talk with slides, and a 20 minute demo. The talk – it was a disaster (I should have kept the feedback forms, they were brutal). I froze. I read my notes. For 30 minutes, I read – verbatim.

But then came the demo (I sometimes joke now that I have a "no demo clause" in my contract). I was running Windows for Workgroups 3.11 with Oracle 7.0.something beta for Windows. (note to self: beta software = bad idea, especially on an OS that starts with W). So I’m going along and it is going great. No notes, but I have a keyboard, I’m sitting down and I almost can pretend no one is there. Then, the GPF. Remember GPF’s? The white box, blue border, big grey button in the middle? Now, imagine one about 30 feet high on a big screen in front of now hundreds of people (to this day, I try never to walk out of a presentation if I can help it. You want to ruin someones day, walk out of their session, better yet, talk while you are walking out). Well, it was all over then.

I've gotten much better I've been told. But it was something I had to literally force myself to do. I can relate to Carly Simon in that regard, but the only way to overcome it was to -- Well sign up for it, commit to doing it and doing it. (theme going here).

I guess I just sort of evolved into where I am today -- there was no grand plan, no roadmap. As Woody Allen said "80 percent of life is just showing up". (warning, theme appears again)

[quote src=Woody Allen, A life in film, Richard Schickel]
By this Woody means that if you put yourself in the way of opportunity -- make yourself available to ... some task you think you might be qualified for -- something good may come of the fact that you are there and that someone else, perhaps equally qualified, is not. The corollary of that idea, of course, has to do with not showing up -- not finishing your play or novel, not going to the audition, being so shy or insecure that you dare not risk failure

I read that the other night and thought to myself, that sums it up rather nicely. I wish I could say that I had some master plan, that there was some path I was following. But really, so far it has been volunteering for stuff. Forcing change (going to New Jersey, not staying stuck where I was). Taking a risk, going to Oracle was a risk then (stock was $1.28 the day I joined). Version 7 was just coming out -- this company Sybase was killing them with stored procedures and soon with 'replication server'. Informix was looking cool and the future held 'datablades'. It was database war. That actually made it interesting for me -- I was on the frontlines (and appear to have picked a good team to be on, Sybase and Informix really don't come up anymore). I got lucky -- my skill set was needed, and having actually used the product made me credible (something I vowed to never lose, the hands on credibility, I hate to talk about stuff I haven't actually used and tested and broken).

Forcing change. That is one way to look at it. Sign up, commit, move on. I've done something different almost every year at Oracle. Change is good (or another way of putting it, I have a short attention span).

Thursday, April 28, 2005

Things you know

do you prioritize what "new things" you'll be learning first?

From a presentation I give about 'things you know'... I have this list

(you will have to read this list more than once to "get it", they are tongue twisters all, read them one word at a time deliberately, that helps me)

1) Things you know you know (you've used them, you've proven them)

2) Things you know that you don't know you know yet (you have the bits and pieces, just haven't put them all together)

3) Things you don't know that you know you don't know. (things you haven't used yet in real life)

4) Things you don't know that you don't know you don't know (follow on from #3, if you haven't used something, there is so much about it you don't even know you don't know yet)

5) Things you know that just ain't so

These are what I look for, categorize things into.

#2 is something I look for, like an unexplained phenomena in the database, just figured one out yesterday with read consistency and 10g. My scripts had all changed in their behavior between 9i and 10g -- the ones I've been using for a long time. I could not explain it. Yesterday, all of a sudden, in a flash of intuition, I could - and proved it (as in provided myself compelling evidence that what I thought was true was in fact the cause). It was dynamic sampling kicking in and changing the number of IO's a query would do... I had a script that in 9i and before would consistently show that after 10,000 updates of a row (followed by commit), a query opened before the updates would do 10,000 IO's to rollback the changes. In 10g, sometimes it was 3 IO's, sometimes 500, sometimes thousands - but never 10,000. Made me really nervous presenting - because I knew it would show something - but not sure what I would see. Now I know why (and I knew why, I just never put the pieces together) Dynamic sampling would query the table and sample the blocks - and do some of the rolling back I needed to have done and I would take advantage of it. Analyze the table up front and I'm back to 10,000 IO's every time. I didn't know I knew why, hadn't tied all of the bits and pieces together.

#3 is really easy. Those are the technologies I have on a list of "things to learn about". I really need to do a deep dive into ASM, but I need the project to drive it. I learn things like that by doing them for real a couple of times. Just playing with it in a lab doesn't always get me where I need to be. It might not be something I get to for a while, but it is on my list. But I do need a real project to work with it on. (streams is high on the list too but the same caveat applies, I'll need a project to learn it right).

#4 is one I don't have too much of a problem with. Anything I haven't actually used in real life. I tend not to talk about them too much. I don't know what I don't know about them so I avoid pretending I do. It is an extension of #3 in that unless and until you've used something a lot, there is a ton about it you don't even know you don't know yet. I try to learn about them as I go along, but try not to talk too much about it until I do.

#5, that is a recurring theme for me. Question Authority. Show me. Prove it (as in show me compelling evidence that you know what you say is true). Don't ask me to "trust you", because I don't trust me, why should I trust you. We are all full of #5, our backgrounds and experiences guarantee that. This paper I wrote is all about #5. We all know things that just ain't so.

Today for example, going through Expert One on One for the second edition. I am fairly impressed by what I did in 2000/2001 (although sometimes I also find myself saying "doh, did I really say THAT"). Not the book itself but rather the way the book speaks for itself. I had never written one before that but it is holding up rather well. When it is wrong about how something works in 9i/10g (because it was written for 8i and before), it tells me! It didn't know it would be wrong, but it tells me. How? The test cases. They all run, but some with different results. So the funny thing is I'm discovering new things about 10g that I didn't know before - and 10g is different in many ways from 9i I'm finding. And 9i from 8i. Just by replaying the book. Little things, big things. Little thing - test case on how triggers affect redo generation of inserts, updates, deletes. Ran it in 10g and said "wow, 8i did it differently". Ran it in 9i and said instead "wow 10g is unique". The rules changed. Many of them have. Silent array fetching in PLSQL, redo generation different, memory allocation - way way different. Big things -- even subtle differences in 10g over 9i - anyone notice that in 10g shared_pool_size the parameter equals the sum(bytes) from v$sgastat - that'll never happen in 9i and before. What does it mean to you? Well, that your shared pool is smaller than you think it is in 10g if you didn't increase the shared_pool_size when you upgraded. All of the little bits that added onto it in 9i and before, STEAL from it in 10g. For example, my shared_pool_size of 80m in 9i resulted in a 96m shared pool. In 10g, it would be rounded up to the granule size (probably 80 meg actually since that is divisible by 4, 8 and 16. Ok, so I cannot write "probably", it will be 80 meg on RHAS 3.0 32bit Oracle 10g) and would be 16 meg SMALLER than in 9i.

So, I don't really prioritize what I learn, they just keep sort of hitting me in the face from time to time. Slap slap, wake up, something new is here. And it is always nice to know. I just file it away for when I need it.

Wednesday, April 27, 2005

Messed up big time

Ok, so I messed up.

On asktom, you have the ability to be notified by email when an update to your question is done. That is, when someone posts a “review” or I do a “followup”.

Well, over 5 years, lots of emails have changed – so when a question from 2 years ago is touched, the odds are very high that the email will bounce. Guess who it bounces to. That would be…. Me.

Ok, so I’m writing the second edition yesterday morning (and hating most every minute of it so far… The second edition is less fun than the first, harder to update than write from scratch). So, any diversion is acceptable. The diversion this morning – one too many bounced emails. I must do something about them.

I decide “I know enough, heck, I wrote it”, so I proceed to just update the repository of questions and answers – setting the notify flag to false for any question over 6 months olds (yes, that would be most of them).

Before I write the following paragraph, I want to make something perfectly clear, this is about me, it is not about anyone else. It contains no hidden meanings. It is something I will say a dozen times a week in writing, not as often as I’ll mention BIND VARIABLES perhaps, but close. So repeat: this is not about anyone but me. None of these articles have been about anything but what I wanted to say – on my own time, after hours, from my home, not on Oracle time. Anyone that thinks this is some of of dig at them is charging windmills like Don Quixote.

What I did was the functional equivalent of updating the data dictionary. As that is a big huge mistake, this was a BIG mistake, I knew it wasn't 'smart' – but it seemed “so easy”. I bypassed my own API’s and just did it. Huge mistake.

How many people noticed that I actually updated over 8,000 articles yesterday at 10am? All of them – same timestamp….

Problem was, I did not notice. In fact, it wasn’t until later in the afternoon that I received this email:

Subject: A very, very busy day ;o)

... all "Ask Tom" entries got updated on 26 Apr 2005 10am ...

(yes, that would be the Bozo the clown emoticon ;o) Max -- thanks for that ;)

Well, if you look for silver linings – this was, yes, yet another diversion from writing! However, it was quite the bummer since I got the email about 3pm – some 5 hours after the deed, and my DBA had the undo retention set a bit low (it is now much higher thank you very much). So, we restored to another machine, rolled forward to 10am, created a scratch table as select the primary key/timestamp from this table, exported that – ftp’ed it over to the real server, imported it, did the update and – hey, we are back in business.

Only it was a stupid thing. Because I knew too much and forgot even more. Forgot about that trigger (but remembered to disable it during the “fix it” update). I hate triggers -- I'm on a campaign to eliminate them where possible.

I’ll use the API next time, actually, I’m going to modify the code soon so as to not send updates to people after six months have gone by. It’ll really reduce the amount of bounces I get (I get so many, I don’t even look at them anymore – which means the improperly addressed email from me gets tossed too, which is bad)

Moral of the story: updating tables directly -- bad. Really bad. Even when you think you know what you are doing.

Tuesday, April 26, 2005

All about Time

Any tips on time management? Surely you do a lot more in the same time than a average person. I think the trick is to work smartly. But how?

I don't think I do more than many people. What I do might be more conspicuous - you see it, but I don't think I "do more".

How to be efficient? Do what you know. If I had to sit down and research every topic I wrote out in Expert One on One Oracle, or Effective Oracle by Design, they would have taken ages longer. Much of it I was able to type literally off the top of my head. Some of it needed research, but mostly in search of the best way to show something I knew to be true, or at least thought I knew to be true, sometimes it wasn't true! For example, did you know that in Oracle 10g, maxtrans as a physical storage characteristic is deprecated. That stumped me for a couple of minutes today in revising Expert One on One - my tests to show the effects of maxtrans worked in 9i but not in 10g. Case in point why test cases to demonstrate something are crucial, never would have known that otherwise. That is why in answering, I provide them (maybe that is another thing to add to the list of time management, would you believe me if I was wrong frequently? Would I have to spend more time convincing you without them. The test cases are my insurance policy)

If I had to figure out what I was writing about, I would be a lot less effective. I guess that is why my books will be last to market. By the time the second edition of Expert One on One Oracle hits the streets, I'm sure 10g R2 will be out. This is what I'll have to say about 10g R2 in my book:
This space intentionally left blank.

Just like I did about 9ir1 with the first edition and 10gr1 with Effective Oracle by Design. I wrote about what I already knew, I wasn't learning and writing at the same time.

On asktom - I deliberately say "Sorry, I haven't touched forms in 10 years - use". I used to burn some amount of time trying to track down an answer, but now know that just forwarding it on is the most efficient way to do it.

You have to figure out what is important too. I find deadlines are mandatory with me - give me a task I'm not 100% into without a deadline and forget it. It'll happen when it happens. Give me a deadline, something I can put on my calendar and it will happen.

I guess it is about commitment too though. If I say I'm going to do something, I work fairly hard to ultimately do it. Sometimes accomplishing a lot is a matter of signing up I guess. I coached an Odyssey of the Mind team again this year, my son is on it (they took second place). It meant trying to be home on Friday after school from 3:30-5:30 and for a couple of hours on Saturdays for a couple of months. It was a lot of work (getting a team of six 12 year olds to accomplish something without "outside intervention" is much like herding cats or mice. Really hard). I made a commitment to do it though. It wasn't a "in my spare time" sort of thing. There is no such thing as spare time. I had to set aside the time and just say it'll be done at this time.

So I guess it would boil down to

  • Do what you know best.
  • Prioritize.
  • Delegate.
  • Commit.

Oh, and get a deadline if you are like me, deadlines are very useful. Nothing like an impending deadline to get me motivated.

Maybe this is most important of all, do something you like and think makes an impact. Then it hardly feels like work.

Monday, April 25, 2005

The Birth of Asktom

Next blog should be on "how AskTom was born" ;)

I'l like to thank Kelli Wiseth and the Oracle magazine staff of 2000 for getting it all going in the beginning.

The genesis of Asktom is this usenet posting from 1999. Someone posted the concept of updating the Oracle data dictionary directly – something no one, expert, professional, newbie, whatever should suggest under any circumstances. Something goes horribly wrong and support tells you to do it – OK. But for any other reason, sorry, but no. The thread on usenet was asking about how to rename a column, before that feature was introduced (8i was the current release at the time of that posting, rename column was 9i).

There was a simple answer (two of them). One was the answer I always gave – create a view, this is what views are for. You can reorder columns, you can rename them, you can do whatever you want – all with a view. The other was a new idea. There is a drop column – you can add new column, update it and null out the old, drop the old. (Neat thing, if you goto the thread view by clicking on the thread title, you can see that Jonathan Lewis and I gave exactly the same answers, always made me feel good to see that).

Well, someone followed up with “what do you think about updating sys.col$?”. I, definitely having an opinion on this, said “I think it is a hugely *BAD* terrible idea. Words cannot describe how bad it could be.”. In an offline talk – I discovered the concept for the idea came from…. – to be exact. It was in a user contributed ‘tip’. I got in touch with the editor at the time, Kelli Wiseth (she left Oracle for a while and came back, left again... See this for an ongoing example of her work). Turned out they had no one vetting the material supplied, they just assumed it was “ok”. Given that I definitely had some feelings about that – they asked me if I would mind doing that. I agreed. I would accept or reject the tips for each print copy of the magazine and the online edition.

Over the next couple of weeks/months, it came to light that they got questions in addition to tips from readers all over the world. They had no method of answering the questions and couldn’t really do anything with them. Kelli asked me if I would like to take a peek at some and the concept of Asktom was born in 2000. The very first question ever asked and answered is available here. As you can see the format has changed a little over time, but the concept is the same.

In conjunction with the print column, we took the Asktom online in February/March of that year as well. It started as a perl application running on OTN that used email. A reader would come to the form, type in a question, hit submit and it would end up in my inbox. That lasted about 6 weeks. When I started coming in to work and having 40 or more questions in my email – that concept ended. I had no way to control the influx of questions, I had no way to turn it off when I didn’t have the time.

So, that was when the machine ‘’ (also known back than as, OSI stood for Oracle Service Industries, the name of the division I worked in. I ran the web servers and databases for that divisions internal and external systems.) was born. I wrote by hand Asktom "version 1.0". It was a “black and blue” color scheme (wish I had kept a static page or two, the wayback machine on the internet archives doesn’t have a copy from early 2000) and had about 4 or 5 pages. I used PL/SQL (of course) and at the time “owarepl” , a pre-cursor to both webdb’s lightweight listener and mod_plsql.

Shortly thereafter, the people that originally wrote webdb were off doing a new thing – the thing that became HTML DB. When it was almost ready for prime time (way before we would even think about letting it outside of Oracle), Joel Kallman offered to prove that it could work by rewriting asktom in this tool. Since I had all of the API’s done – the API’s to save a question, update a question, ask for more information from the person submitting the question and so on – this would be a test of the pre-HTML DB environment to build a user interface and handle all of the security, navigation and so on. We blossomed from basically 5 pages to over 40 today simply because of this switch. There is no way I would have by hand coded 40+ pages – there would be features we would not have without HTML DB.

In the early days, I used to get 5,000 or so views a week. Today I get about 80,000 to 120,000 views a day from about 15,000 unique IP addresses per day. In the last month, well over 2,000,000 page views from over 100,000 unique IP addresses. It is hard to say how many people that 100,000 represents given that some people use more than one IP address (dhcp at work/home) and firewalls make large communities of users look like the same IP.

If you are interested, here are my hit counts for the last 17 months

--------- ---------- -------------------------
01-DEC-03 806320 32192
01-JAN-04 884535 35273
01-FEB-04 968818 34761
01-MAR-04 1242763 60635
01-APR-04 1322224 68658
01-MAY-04 1213422 72447
01-JUN-04 1597191 92343
01-JUL-04 1453072 79602
01-AUG-04 1544078 84743
01-SEP-04 1870786 101935
01-OCT-04 1752753 104764
01-NOV-04 2608425 104638
01-DEC-04 1749504 112242
01-JAN-05 2190787 118164
01-FEB-05 2499986 130210
01-MAR-05 2126486 134406
01-APR-05 1691208 115697

So that's it, that is the story behind the story. I'm still violently opposed to anyone suggesting to update the dictionary without support sitting there with them for any reason. I compare doing so to deliberately putting a virus on your machine. It might not hurt you today, but maybe a year from now when you upgrade and the dictionary corruption affects you for the first time... Whenever I see such a "tip", I go way out of my way to try and get rid of it, erase it. I've spent many hours getting rid of said "tips". They keep popping up in the strangest places.

Sunday, April 24, 2005


Love this site. Just wondering how you deal with burnout. As for me, after 8 hours of programming, my brain is shut down and I don't want to deal anything 'computer' or technical.

Here is a good definition I found:

burnout: The low moral or hopelessness stakeholders feel because of churn, overwork, unrealistic goals, and/or inadequate support. People stop trying because they feel like they've tried and failed, or their work is meaningless or unappreciated.

So, burnout for me would have to involve churn, overwork, unrealistic goals, and/or inadequate support/lack of appreciation.

I definitely do not get the feeling of churn. I do not feel like I am spinning my wheels. Asktom is something with momentum. The books are too. What I do in seminars is very forward moving. Even a sales call has it’s moments. Working with a customer on site or over the phone – very gratifying. I get the feeling that what I do day to day is moving forward. A lot of it is education, here is how it works and why it works that way sort of stuff. That avoids the churn.

Overwork. Depends on who you ask. I still find time to read books I want to read. Go to soccer games (my son’s team lost yesterday, 0 to 1, it was a tough game – my daughters team won 3 to 2, she scored one). Visit science fairs, watch TV, seeing my daughter ride in a horse show, watching the kids play basketball, seeing the school plays, normal stuff… Waiting for summer now, 1 hour a week on the tractor cutting grass – nothing to do but turn the wheel and watch out for rocks.

Unrealistic Goals – I set my own, so they aren’t unrealistic. My goal is to make people successful with this database stuff. That is why many times my answer to a question is “why” – I want to get to the bottom of what they are doing and give them advice on the best way to do that. Not just tell them how to do what they think they need to be doing. Call it presumptuous if you want but almost every time – they didn’t really want to do what they thought they did. And the rest of the time, I come to the conclusion they really did what they wanted to do and I tell them how. I don’t take on more than I can finish (usually :).

Unappreciated – hardly. The feedback I receive is phenomenal. The feedback on the books, on the site, on the seminars – I’ve never felt unappreciated. Not since my first usenet posting in October 1994 and many thousands later. I remember doing an Oracle User Group meeting in Albany New York. The guy introducing me pulled out a piece of paper, it was one of my very first usenet postings – I had answered his question some 8 or 9 years before – and he remembered that, and pointed it out. It was a pretty good feeling.

So, I guess until I feel that I’m starting to churn, no burnout issues. And I don’t see churn happening soon, I think the methods are catching on. I love it when someone posts something that looks like I could have written it. With the example, the measurement, and the interpretation of the data. I don't feel overworked (not yet)… I don't have unrealistic goals, and I am definitely not feeling unappreciated (not even close on that one, thank you all very much) burnout isn’t going to be an issue.

Trust me, I take time away from this stuff. It is not the only thing I do. But I like what I do and that is probably the most important thing.

Saturday, April 23, 2005

Moore's Law

40th anniversary of Moore's law. Where do you see or want to see technology go in the coming years?

That is a really hard question. I would have answered differently a year ago - before I read Ray Kurzweil's book "The Age of Spiritual Machines, when computers exceed human intelligence". Before that, I was thinking in terms of incremental advancement. Now I'm thinking in terms of explosive advancement.

I am the same age as Moore's law (one month older to be precise). When I look back to being a kid in the 60's and 70's (riding around in the back of a really big car with vinyl slippery seats so you slid from one side of the car to the other if you wanted on turns - without seatbelts) to what my kids have today - it is amazing. Almost nothing they use even existed back then. They have USB mini-ipods for music (I was happy to have a walkman finally at the age of 14 - it was the size of a paper back but it was music). I don't think they'll ever buy music in a store in their life. I remember spending Saturday afternoons in the "Play it Again" record store buying used LPs. I actually had an 8-Track recorder (i could make my own 8 tracks from albums, good thing too -- 8-Track was the only source of music in my best friends car, and he had a black TransAm, I had a yellow Chevy Vega -- there was no question what car we were taking). I remember when you could open a car hood and make sense of what was in there. My Toyota Prius has more computing power than my first computer (a Tandy 1000/EX bought in 1987 when I got a job as a programmer). Everything is getting all tied together - my phone "bonds" with my car as I get into it now. I remember car phones, right before cell phones took off due to their shrinking size. So many things have changed at such a rate in our lifetime as never before (not saying anything new or revolutionary there - just a fact).

I wish I could remember the title/author of the book I'm about to describe. I read lots of Science Fiction, so this would have been a book I picked up in an airport just to have something to read. The story started with some people finding an intact space craft embedded in the bottom of a dried out seabed. It was powered by water (hydrogen powered). It was ancient but there were mummified bodies in it, and pictures. They were us as it turns out. The thought was that an advanced civilization can only stay that way with critical mass (lots of people). These people were from such an advanced civilization - crashed here on this planet and the survivors were us. Without the critical mass, they "devolved", lost their technology -- not enough people around to keep it up. We had to build up the critical mass to get back to where we are today.

That made a lot of sense to me, I could believe that in some sense. Without the mass of people we have now, all working simultaneously on the same problems, the level of advancement would be very slow indeed. Throw a million times the people at it and the problem gets solved faster. The problem solving goes faster as well as the ability to communicate and share information grows. Remember when "hurry up, it's a long distance call" meant something? Today I don't care where in the world I am, I've got my phone and just use it. I get my text messages in Oslo Norway as easily as in Leesburg Virginia in the US. It struck me, sitting in a hotel lounge in Geneva, looking around, with my headphones on listening to streaming audio from XM Radio and instant messaging from someone at work (for me it was 6pm, for them it was noon) on a wireless network - it didn't really matter where in the world any of us is, we can instantly communicate - for free basically. That is what is allowing us to incrementally advance, all of this shared common knownledge.

Kurzweil's book however turns that upside down. His premise is that we won't incrementally advance - we'll suddenly evolve ourselves into something else. He doesn't believe in an advanced civilization coming down from above and interacting with us - his thought is the advanced civilization would be unable to recognize us and we them. The melding of mind and machine - the ultimate in virtual reality and no more death (as long as the DBA's we leave behind do proper backups of course and test them out!). It is a scary thought - forget cloning, someone just does a database restore elsewhere and hey, maybe there you are again.

If you have the time, I do recommend the Kurzweil book, it is pretty much a "shake you up" sort of read. I don't buy all of it, but the concepts do make sense and make you think about it differently.

But back to the topic (or not). I'm finding things to become so complex anymore that the next big thing needs to be things that just work most of the time. I think they got it right in my car. It just works. Getting the phone to bond with the car (I still like that euphemism, devices "bonding" with eachother) was the most complex thing I've to deal with. However, it was a little unsettling to get a recall notice for a software upgrade (it was for the navigation system, it's optimization routines for finding the best path needed a little help Sounds familiar doesn't it? :)

Tivo for example, they got it right. I resisted the urge for so long to have Tivo and we got it just recently. I don't know what we did without it before. I watch about 3 shows - Star Trek: Enterprise, 24, and ER (only because that is my wife's favorite show).
With the traveling I do - I almost always missed 24, Enterprise would be hit and miss and ER (well, if I missed that one, that was ok..) Now, they are just sitting there. Pause, fast forward (commercials, hate them) - way cool. And I didn't need an advanced degree in TV to do it. Even my mother in law who lives with us and has her own Tivo "got it".

We need more Tivo's I guess.

Friday, April 22, 2005

Outside Oracle

Good to have you outside the Oracle domain. We have heard a lot from you on Oracle. Will you write on other technical or work related topics like books, Linux, testing, other technologies.... list is endless.

Yes I think so, as time permits. One of the applications I’m totally into right now is VMWARE. One my laptop I have seven databases now. 3 in windows vm (8i, 9ir2, 10gr1), 3 in a small linux vm (9ir1, 9ir2, 10gr1) and one in a big linux vm pretending to be a 2 instance RAC cluster using ASM and OCFS (you can get the last one from here yourself, just have bandwidth. Click on the database link on that page. Comes with 90 Trial of vmware).

Using vmware, I don’t install software on my base laptop, I install it in a vm – I cannot “damage” anything, it is a very safe environment. I can do OS/database patching, upgrades, whatever without fear of accidentally knocking myself out. Vmware has this neat “snapshot” and “revert” feature. As someone that likes to play and test – this environment rocks. As someone who needs to setup a strawman – try something out, beat it to death and start over, this has been a big change for the way I work. Doing training and other things are really easy now. Instead of a single machine trying to run 20 instances, each desktop runs it’s own virtual machine and everyone, everyone has the same exact setup. No install this database/app server/whatever on 20 machines, do it once and copy the vm’s.

I even use vmware on some of my larger machines – as playground. Something to look into. If you wanted to play with 10g RAC, ASM, OCFS, Grid control, the whole thing and have the bandwidth, you might check it out. If you do training, it is definitely a piece of software to have. If you have a single machine and need “test areas” (test that upgrade, test that patch, test that new code) in a single test machine, absolutely something to look into.

Thursday, April 21, 2005

What about Mathematics.

What about Mathematics - do you think your College years have shaped your mind, and so influenced your way of thinking about and approaching Oracle (or life in general) - or not ?

Do you think you would have been a radically different Tom without your education?

Let me address this in reverse. Would I have been a radically different Tom? No, I don't think so. I might not have had the same opportunities that I had, but I would not have been radically different as a person.

I owe much of what I am technically to a guy named Woody Lons. I answered an ad in the Washington Post posted by GRC (small company that no longer exists in Vienna Virginia) for "PL/I programmers wanted, no experience necessary". I absolutely qualified for that. On the same day I interviewed with GRC, I did an interview with another small company -- Quantum Computer Services, in Tysons Corner Virginia, not far away from GRC. (I remember eating at Wendy's in between, it was a really hot day out). With my BA in Math from the University of Pittsburgh - I had two job offers:

a) GRC. They wanted programmers writing PL/I on an IBM mainframe.
b) Quantum Computer Services. They were looking for help desk analysts for a consumer dial up startup.

The year was 1987. I of course took the cooler of two jobs and became a programmer/analyst (I had no idea what that meant, I had not touched a computer really in college, it was all proofs and theorems).

Well, google quantum computer services, go ahead, oh never mind go here instead. Now ask me if I made the right choice! Hind sight, no big deal. I could be retired

So, I took this job with a bunch of people that were beyond belief (in a good way). I was teamed with a guy Woody - he was about the age I am now as I write this. He taught me lots of stuff - he was my mentor. He taught me how to write code that was understandable, maintainable, debuggable, traceable, self diagnosing. He taught me to think before coding. He taught me to test test test and never say anything "was true" without testing and showing it. He taught me more than any school could have. He taught me how to do this computer stuff "right". I still to this day do the things he taught me almost 20 years ago now.

I could have been teamed with him out of high school and still be most of what I am now, that I firmly believe. Do not believe that a college or advanced degree means someone is better than someone without, it gives them an advantage, especially in the beginning but doesn't mean they are necessarily better. For many, the relevance of a person is in what they can do, not what school they went to a decade ago. They have either been successful, or not. On their own. Period. I especially respect people that are successful - without the initial silver spoon. They had to work harder to get where they are.

Now, did the math degree help me? Probably yes. It gave me a good foundation in what I do now - but that was ingrained in me over and over by Woody. Test, Trace, Prove, back it up, don't make it up. Do it right - you will be in a room with 20 of your peers and they are going to rip your algorithms/code apart. Back in the day of code reviews - )does anyone do those anymore?) those were scary events. Making transparencies for the overhead projector with psuedo code - a room with lots of other programmer/analysts who had been doing this for a lot longer then you - reading it all as you explained your approach to a problem. That is fear, real fear, sick to stomach fear. Criticism abounded, it was expected, it was not only allowed - it was demanded. You were expected to justify what you proposed. You could not just "say stuff". And, if you sat through a code review and just nodded your head, you were not doing your job.

I have "observed" (slipping totally into opinion) that some of the best programmers are math, engineering and history majors. Totally an opinion and observation. It might be the training in critical thinking and "analyze" mind set.

Did the college years shape my life? Sure, but only thru coincidence, because of who I met and made friends with. I met my wife of almost 18 years there when I was a junior. I learned to work 30-40 hours a week and do the school thing at the same time from the time I was a freshman. I was a first a cook and then a manager in the student union restaurant. I opened it at 6:00am (it opened at 6:30, but lots to be done to open). I worked lunch rush. I closed it at night at 7:00pm. Scheduled classes around that. Cut loose on the weekends, except during football/basketball season. I worked the games cooking or delivering food. Guess the weekends were mostly shot too :). It sounds bad but I look back on it with good memories. Made friends there that I have to this day, most from the restaurant.

So, it was just one of many experiences that brought me here. I had no formal training in databases in school, but I read the books, a deep book that made me see the light is on my links I like page, the book on transaction processing. The chapter on two phase commit (in the release I had) compared it to a wedding with the minister being the commit point. "do you take this man" (vote to commit) - yes, then PREPARE to commit, "do you take this woman" (vote to commit) - yes, then PREPARE to commit. "Anyone out there have a good reason not to do this?" -- no, then "I pronounce you man and wife" - transaction is committed. I got it! I had mentors. I listened to people. I learned from them. They made me what I am now.

School - it was important, but if you didn't have a chance to do it (it could be hard, not everyone can get there for various reasons), so be it. The school of experience is more than enough for me.

People are who they are. Especially after many years in the business. A good suit and piece of paper from years ago won't make you any smarter than you are today. I judge people on their work and contributions more than anything else.

Wednesday, April 20, 2005

About Writing

How did you first think of writing a book like One-on-One? Was it something you always wanted to do, or did it come out of a survey of the Oracle books already published?

How do you approach writing? Do you take time off from work, or is a parallel activity?

Have you ever suffered from Writer's block?

I didn't come up with the idea; a guy named Tony Davis came up with this "brilliant idea". It was the year 2000, I was just sort of "there" wondering what to do next. I figured I could go back to school and get some masters degree. That was my plan. Then Tony contacted me out of the blue (from my newsgroup postings and now asktom) and recruited me to tech edit some books. The first book he sent me was actually quite bad (can you spell plagiarism, google found some copyright hits, I recognized the concepts guide, many other bits of Oracle documentation). Basically I'd be reading it and it would be unintelligible and then it would be crystal clear, perfect, then really bad again. That got me curious and I found the copied material. So, I sort of blasted it and Tony (in need of a new book at that time) suggested this "bright idea".

Hence, here we are. He asked me to write a book, I thought about it and said, “why not, how hard could it be”. When I wrote Expert One on One -- it was my first attempt, only a little naive. Originally the book was going to be the back 2/3rds of what it is now, but in December of 2000 this guy Jonathan Lewis sent me a copy of his new book Practical Oracle8i. Now that was an incredible book (I am jealous of his writing style completely). After I read it -- I panicked, redid the outline, dropped some back stuff and added the first 1/3 (which is now actually my favorite part). When we published it, I thought no one would actually buy this book – and was quite surprised at how well it did.

The conceptual material for the book came from the asktom website. It was what people asked about. It was what I knew. That made it easier – but it still took 9 months and near the end it was torture.

Funny thing was, I was thinking about getting a technical MBA – had the advertisement for it from the Washington Post in my hands when Tony talked me into writing Expert One on One. Turns out – 2 years later, after the book had been out for a year, one of the Professors at that university was using it to teach a database course, for that technical MBA. They asked me to come in and lecture one morning about databases, which I did (Saturday morning, they did weekends and weeknights). Turns out, I was lecturing to the class that would have been the one I would have been sitting in. They were close to completion (Expert One on One took me 9 months of weekends and weeknights), and I told them but for the freak accident of Tony getting me to write the book – I’d be sitting there with them. They all agreed I made the right choice…

So, it was pure “luck”, not much research went into it before hand, I wrote about what I knew and it caught on. The same with Effective Oracle by Design – which originally was going to be a WROX book but they went out of business. Shopped around, found an excellent editor/publisher in Lisa McClain at Oracle Press and did the deal with them. Lisa had a copy editor Monika who was excellent as well – so the final book came out rather nicely because of them (and the tech edit team – I had it gone over twice which was really nice).

But again, the concept for the book was just “what I knew, what I felt was relevant”. They evolved more than anything else.

How do I approach the writing – for the first two books (and even Beginning Oracle Programming to which I contributed a couple of chapters) I did it in parallel, lots of weekends and evenings. For the second edition, I’m finding that doesn’t work as well. For one thing, I seem to be traveling a lot more than I did in 2000 and 2003. For another, the kids are older and weekends are full. So, I’m trying a new concept – a writing “vacation”. I’m in the middle of that now (and apparently I’m desperate for distractions, hence the new blog!). I won’t finish it all, but hope to get a chunk of it done.

Writer’s block? No, not really. But “a total despising of what I’ve written” – big time. Especially this time around. I’m finding editing much harder than writing from scratch. There are lots of loose ends to tie up. For example, when working on chapter 5 it might say “as we saw in chapter 1”, only now chapter 1 which I rewrote might not say that anymore….. It is turning into very much of a rewrite for now.

Tuesday, April 19, 2005

A day in the life

Someone asked yesterday

Can you please explain me how your typical day looks like? Is your clock different and you get more time to do all these great things than me?

Well, it varies based on whether I'm on the road on at home...

When not traveling, the typical day starts at about 6am, on the road by 6:30am, at the desk by 7am. Do the question thing for a bit, get email done and generally try to drink as much coffee as I can so that by 9am when others are fully in force -- I'm awake.

Then the day is filled with things like meetings, conference calls within Oracle and with customers, dealing with email and customer issues, any employee matters that come up (I manage a small team), researching, presenting to customers, round table discussions, fixing things, answering questions on asktom during the day, putting the column together, doing a response (white paper), whatever. I like to stay as hands on as possible.

I try to leave by 4pm to avoid the traffic on the way home. Have two kids Alan (12) and Megan (9) so something is usually going on in the evening. Then check email, do a little poking around on the web, tv, go to bed.

When traveling, it really isn't that much different, just longer hours I guess. Usually up 5:30/6am, try to get some time on the site in the morning, do whatever I'm in town for -- most of my trips are one/two day trips. Every now and then I get to unpack and stay for a couple of days. Those are usually "problem sites" where it takes a day or two to diagnose the issue, test a fix, deploy. After working at the customer site (presenting, doing a seminar, working on a tuning issue, whatever) it is either back to the hotel for more questions/email or to the airport to get to the next place.

For example, I'm going to Ottawa this evening, get in after dinner. Have 3 customer visits tomorrow, one on Thursday, do a seminar for the Ottawa OUG from 1-4pm and then fly home that evening.

This month is unique for I've taken most of it off from Oracle to work on the second edition of Expert One on One Oracle (to be renamed as WROX went out of business and Apress lost rights to use the "Expert One on One" tagline when they bought it). So, this month, it is up at 6am as normal, do the questions (just the reviews this month, no new questions) and email -- then try to write...

Monday, April 18, 2005

Ok, so I won't do that

While the comments here were generally positive, based on some private emails I've decided not to do that debunking here. I'll leave that on, when I get a question about some material -- I'll just do what I've always done...

Instead, I'll just use this as a place to say stuff. Outside the domain.

This month I've been working on Expert One on One Oracle, second edition. It is sort of eye opening. I'm taking the book from being Oracle 8i, 8.1.7 and before specific and updating to 9ir1, 9ir2 and 10gr1. So much has changed. The single chapter that was chapter 2 (Architecture) is now chapters 3, 4 and 5. In Oracle's quest to make things easier, it has become alot harder to describe! Look at files -- lots of new "file stuff" from ASM to spfiles to flashrecovery areas. Memory, unbelievable. Describing the SGA used to be easy, how PGA/UGA memory worked -- a piece of cake.

Now, are you auto PGA memory management and what about that pga_aggregrate_target which is more of a wish than a directive and add into that auto SGA management, manual SGA management and the hybrid automatic/manual mode you could put it in -- well, 12 pages blossomed out to 35 pages.

I even have some 500 user tests in there, to show how workarea_size_policy = AUTO|MANUAL scale up in their use of memory... Wonder how I got that on my single cpu laptop?.. Actually I ran that on my dell poweredge server in the basement. It was quite fun, never did a 500 user test in my basement before. Things have changed since version 1 of the book.

As for the book, I would like to offer an opinion on books -- technology books. I was involved in a discussion on this topic and someone made the claim that

As the book, as with most do today, had to be published by a certain date we did most of the work on beta and to provide complete coverage, some was from docs.

The marketing truth these days is, if you aren't first to market with a book you won't have sales.

I really took exception to that. I don't think that is the truth. I think that was their choice. If you are writing a book on technology, as a technology "name" (a name people just trust, because they know the name), writing a book based on beta software and making suggestions on how to use it (based on beta software) without having any real world experience is a bad choice.

I can promise you one thing, my books will be last to market. When Expert One on One Oracle first edition went public, a book that says on the cover "covers Oracle up to version 8.1.7", it was one short week before Oracle 9i went production.

When Effective Oracle by Design first edition went public, Oracle 10g Release 1 followed it by four months.

In both cases, I could have had the very first 9i and 10g book on the market. The publishers would have loved it (so they think). I refused to do it. Why? Because I had no real world, in the field, been using it and breaking it experience to work from. I had lots of nice theories about how it "should" work, "might" work, "could" work -- but not having actually used it in real life, I won't write about it.

So, maybe beware of the first to market books. Other than being a new features guide (which Oracle puts out by the way...), the material contained therein may be questionable, as it hasn't been put to use by anyone yet.

I look at a book and judge it not by the cover, but rather by the quality of the technical review team. I've been very "proud" of the teams working on my books. I've learned alot from them. They are what make or break a book. I've sat on both sides of the table on this one, I've written 2 books and contributed heavily to a third. I've tech edited perhaps 10 or 12 now. I've reviewed books that were a pleasure to read, with minor corrections to be made. I've read books where I've sent back "if this chapter remains in the book, I want my name off of the list, i refuse to be associated with it (and here is my evidence why I'm saying this....)". In the end, the books that get published are better and some of the books just never get published at all (which is a good thing).

Anyway, back to the book. I'll update this site from time to time with opinions. We'll save the debunking as something for Q&A on

Sunday, April 17, 2005

Toying with blogging

I've been toying with this blogging idea. Wondering if I should do it. My asktom site is sort of a blog, but very much technical. I don't generally expose my opinions outside of the question being asked.

What I've thought about doing here is some debunking. Taking an internet posting about Oracle that someone (or me for that matter) feels is just plain wrong. Taking a look at it. Trying to understand what the author might have been trying to say and whether I agree with the content or not. In the same vein as Database Debunkings does. I'll try not to be as blunt as they and their readers are sometimes, (but I do rather like the readers use of the dictionary in this letter to the editor, I'm fond of that tool as well) but it will be "to the point".

I'd like to hear feedback on what you think about such a concept.

If I go forward with it, I would accept URL's that point to material readers feel is questionable. I would ask that you would email the URL to me along with a brief description of why you feel it is questionable material (dangerous questionable material would be most prefered, material that in the hands of a neophyte would be downright bad). Then, at the rate of once or twice a week, take a look at one or two of them.

I would attempt to contact the author of any such material beforehand with my inputs, I've done that in the past on asktom prior to posting material, in a good faith attempt to correct the material. But if the information is unattributed or I cannot reach the author, that would not necessary stop the presses.

All comments, anonymous or otherwise, fully appreciated.