Friday, September 30, 2005

Time for a new view indeed

Updated October 10th, 2005

Curt Monash sent me this link. There he writes that the editing of the comments was not performed by him, but rather by Computer World itself.

Original Entry

I've been sitting on the sidelines watching a "discussion" take place. It was started by this opinion article.

I thought it was relevant as it seemed to fit into my prior blog on the most incredible thing I've heard - almost a parallel universe. I found it interesting how censorship came into play big time - the author of that article decided to remove comments - heck, he even *edited* comments! He actually edited what other people wrote. (That is outrageous if you ask me)

Some of the people following up were Fabian Pascal and Alf Pedersen. Alf pointed out this morning a followup by Chris Date (an innocent bystander that was basically brought in by the author and ridiculed for some unknown reason). It all got rather messy.

Reading through the thread was much like a parallel universe for me - it certainly did remind me of some 'discussions' I've had. To me -- the parallels were astounding.

You should click on the Alf Pedersen link and read the linked to articles in order after reading the opnion article.

Thursday, September 29, 2005

Most incredible statement I heard this week

Was this:

I might be naive, but Oracle is supposed to be this big powerful RDBMS engine but it can't handle anything. I think we're overpaying for it. The design should have nothing to do with performance. Oracle must be able to handle everything.

The design should have nothing to do with performance....

Think about that statement for a moment.

The design (the most fundamental thing, the cornerstone of the 'system', the key piece, the thing were much time should be spent...) should have nothing to do with performance.

The design should have nothing to do with performance....

I keep saying it over and over and it still sounds, well, not smart.

Think about a car: "the design should have nothing to do with performance".

Think about anything, "the design should have nothing to do with performance".

It is all about the design, from day 1, the key component to performance is the design - maybe the only component in fact.

Two others have commented on this as well.  First was Pete-S and second was Tim Hall. I agree with their sentiment.

The following is the opening section of both Expert One on One Oracle (modified from the original a bit) and Expert Oracle Database Architecture and sums up my thoughts on this (which are 180 degrees opposite of "design should have nothing to do with performance":

I spend the bulk of my time working with Oracle database software and, more to the point, with people who use this software. Over the last 18 years, I’ve worked on many projects—successful ones as well as complete failures—and if I were to encapsulate my experiences into a few broad statements, they would be

  • An application built around the database—dependent on the database—will succeed or fail based on how it uses the database. Additionally, in my experience, all applications are built around databases. I cannot think of a single useful application that does not store data persistently somewhere.
  • Applications come, applications go. The data, however, lives forever. In the long term, the goal is not about building applications; it really is about using the data underneath these applications.
  • A development team needs at its heart a core of database-savvy developers who are responsible for ensuring the database logic is sound and the system is built to perform from day one. Tuning after the fact (tuning after deployment) typically means you did not give serious thought to these concerns during development.

These may seem like surprisingly obvious statements, but I have found that too many people approach the database as if it were a black box—something that they don’t need to know about. Maybe they have a SQL generator that they figure will save them from the hardship of having to learn the SQL language. Maybe they figure they will just use the database like a flat file and do keyed reads. Whatever they figure, I can tell you that thinking along these lines is most certainly misguided: you simply cannot get away with not understanding the database. This chapter will discuss why you need to know about the database, specifically why you need to understand

  • The database architecture, how it works, and what it looks like.
  • What concurrency controls are, and what they mean to you.
  • That performance, scalability, and security are requirements to be designed into your development efforts, not something to hope you achieve by accident.
  • How features are implemented in the database. The way in which a specific database feature is actually implemented may not be the way you might envision. You have to design for how the database works, not how you think it should work.
  • What features your database already provides for you and why it is generally better to use a provided feature than to build your own.
  • Why you might want more than a cursory knowledge of SQL.
  • That the DBA and developer staff members are fighting for the same cause; they’re not two enemy camps trying to outsmart each other at every turn.

This may initially seem like a long list of things to learn, but consider this analogy for a second: if you were developing a highly scalable, enterprise application on a brand-new operating system (OS), what would be the first thing you would do? Hopefully, your answer is, “Find out how this new OS works, how things will run on it, and so on.” If you did not do this, your development effort would fail.

 

Consider, for example, Windows versus Linux. Both are operating systems. Each provides largely the same set of services to developers, such as file management, memory management, process management, security, and so on. However, they are very different architecturally. Consequently, if you’re a longtime Windows programmer and you’re asked to develop a new application on the Linux platform, you would have to relearn a couple of things. Memory management is done differently. The way in which you build a server process is considerably different. Under Windows, you develop a single process, a single executable, with many threads. Under Linux, you do not develop a single stand-alone executable; instead, you have many processes working together. In summary, much of what you learned in the Windows environment doesn’t apply to Linux (and vice versa, to be fair). You have to unlearn some old habits to be successful on the new platform.

What is true of applications running natively on operating systems is also true of applications that will run on a database: you need to understand that the database is crucial to your success. If you do not understand what your particular database does or how it does it, then your application is likely to fail. If you assume that because your application ran fine on SQL Server, it will necessarily run fine on Oracle then, again, your application is likely to fail. And to be fair, the opposite is true: a scalable, well-developed Oracle application will not necessarily run on SQL Server as is without major architectural changes. Just as Windows and Linux are both operating systems, but fundamentally different, so Oracle and SQL Server (pretty much any database could be noted here) are both databases, but fundamentally different.

Off the record part II

The other day, I wrote about private conversations and how they should be kept that way, meaning - if you and I were to have a conversation (email, face to face, phone to phone, whatever), you would not read about it here unless I asked and you said "OK".

I got a couple of followups on that, and one email.  The email stated:

Have started blogging recently at svijayak.blogspot.com. In some of the posts I've used references to the 'unison' tool (picked from your blog) and about your blog site too. Although my site is not public, after reading the 'off the record' post of yours, I felt really bad about using your references without prior permission. Thought would drop a line about it and apologize. If you do get a chance to check out my blog and decide that the references should go away, then I'll do that immediately.

(Yes, I asked before posting it :)  That to me is different.  I've written it, it is public, it is out there.  Anyone -- ANYONE should be able to reference it, quote it, comment on it, make fun of it, praise it, do whatever they like with it.  It was a very public comment.

So, let me refine my thought - things you reasonably expect to be private such as

  • An email directly to me, without a .cc list (it is not already public)
  • A conversation we have standing face to face, even if a few others are milling about
  • A phone call, even a conference call - it is still a "you and me" sort of thing.

That sort of stuff is private, will be kept that way. I would not publish that without getting your consent and would hope you would do the same.

Events that would cause this to not hold true:

  • It is already public, you (I) wrote it and put it on the web somewhere, a white paper, blog, book whatever.
  • It was a question to me and I was on a stage talking to dozens of other people during the answer (it was already public)

So, anything I've written - reference away.  Anything I've said in public - reference away. (try to include links back to the source whenever possible, in case the "source" changes over time with corrections and in order to properly attribute the thought to the source). I encourage the references, get the information out to as many people as possible.

Howard Rogers had an interesting comment. I don't agree 100% with the "if you send me something, what I then choose to do with it is up to me" part, but I do agree with the "threatening emails" comment.  I would have to be pushed really far to print them but I could see getting to an "enough is enough and this needs to be exposed" level of frustration. It would take repeated and fantastic claims to have that happen.

Tuesday, September 27, 2005

Digging stuff

Literally. Digging, as in a trench, as in a very long trench. As noted recently, I got a new satellite system. The guy who put it in had a car accident the day before he was installing it. Hurt his back and neck so he could not dig the trench and put the cable underground.

Never fear said I, I enjoy working in the yard (I don't mind it really). I can do it. He offered to come back after he healed and do it - but I said no. He looked at me like "yeah, sure".  Then, he took it off the bill.

Now I know why I work with computers ;) Ouch describes it. I'll be hurting tomorrow. But the entire thing is underground, buried, out of site.

I'll keep my day job thank you very much.

Coming up this weekend - I move some cut of pieces of tree from one place to another place in my yard.  We had to have a couple of trees removed - some died, one was in the way of the most perfect line of site to satellite A6.  It was expendable. Now I have what used to be really tall trees in really big piles. Wood is heavy. Should be fun. Makes me look forward to my Sunday afternoon flight to Toronto for the Toronto OUG on Monday. Should be a good show - Jonathan Lewis will be there as well. I enjoy his presentations.

Sunday, September 25, 2005

Off the record

Mark Rittman had some interesting comments this morning (not that he isn't interesting other times of course). At then end of his blog he mentioned the responsibility of confidentiality and trust placed in people that do this blog thing right now. The concept is "if you are talking to someone that has a large public readership - is what you are saying to them 'on record' or 'off record'".

To me, it is all off record unless I ask your permission. Just recently, I wrote about Trust, in there I named a person I had a conversation with (Kathy Sierra) and quoted an email from her. Prior to doing that I asked for her permission.  I had to wait for a couple of days since she was away at a conference without connectivity - so that blog sat in my folder for a while before I printed it.  In that same one, I quoted Gunnar Bjarnason - and he knew I was going to (right after he said that quote to me, I told him I want to put that into the blog and he said that would be great). 

For me, it is a two way street.  I've been quoted a couple of times on dbdebunk, most recently with this posting. Each time however, I knew it was coming and on an earlier one - I even got to say "if you are going to make that public, I'd rather it be said this way" and he obliged, since he was quoting an email message that was otherwise private (he contacted me, not the other way around).  I also had the choice in that case to say "no, don't publish that". Fabian does have a printed policy on commentary you send him however.

That is more than professional courtesy, that is the way it has to be done. I've some emails that would be "fun" to print, but would never do it. What goes around, comes around as they say and I sure wouldn't like everything I've ever said (or typed, email to me being a form of conversation) posted. 

So, yes, I agree with Mark that what is said to someone should be "private, not for the blog" unless you ask first - or make it known that the question you are asking the person is going to be written about.  Just so they know and are not surprised.

Even something as simple as "what company did I talk to", I ask permission first. Anyone could have a valid reason for not wanting others to know.

So, now you know, if you ever end up sitting next to me at dinner at a conference, or on a customer visit or because I'm there to fix a problem you are having and we talk - it is off the record.  The concepts might come through - if you say something "deep" or teach me something new (and I'll try to attribute you - if you let me) but the confidentiality, it is there.

On an unrelated note, it was fun to watch what OOW did to the hits on the blog:

 

graph_summary_areachart.php

while I don't expect it to remain at that level - it was neat to see that event cause such a spike.

Saturday, September 24, 2005

Out with the old, In with the new

I was very bandwidth challenged for a while. Our direcway connection died a horrible death by wasps. IMG_1349

This is what the dish used to look like a while ago:

satellite

That pole sticking out of it with the transmitter/receiver on the end - full of wasps and their mud/paper nest and everything. The guy who does the satellite for me:

Peter M. H. Spaulding
VSAT Systems  Sales Rep. | Installer
Wk: 540 364 0375
Fax: 703 995 4800
 
said words to the effect "normally you can hear them buzzing, but this time I didn't". Meaning, he was taking a look at why it wasn't working - and opened up a "can of wasps". Needless to say - that was the end of that - and the end of a can of wasp and hornet killer once he could get close enough again. By the way, if you live in Northern Virginia in the US and want a system installed - he is the guy to contact. He is all about customer service.
 
Well, while the dish was "down", we lived off of this card:
IMG_1360
 
 
That is my two and a half year old Verizon Aircard 555 - it has a couple hundred thousand minutes on it by now I'm sure, from travel.  In the beginning, I would use it a good 10,000 minutes a month.  My use was dwindling now - due to wireless hotspots and most hotels having internet, but still used it.  Well, for 3 weeks it was our connection to the outside world. Where I am, it delivers almost ISDN speed. I just "shared" that connection via my wireless connection - in effect being the router for the house for a while. It worked great as a backup, but "speedy" was not a word we used to describe it.  "Functional" was more like it with 5 people hitting the network.
 
Anyway, rather than just replace direcway system with a new one, I upgraded to a more business level of service from Skycasters. Instead of a puny 36" parabolic dish, I now have a four footer:
 
 

img_1353

That is an eight foot ladder behind it to give some scale. The design of this dish is much simpler in nature, the direcway had too many moving/plastic pieces - this one is all "basic metal, no moving pieces"

 

img_1354

It is very simple in design - and has a lot more power than the direcway dish had. Once it got installed (which took a while, due to a software version issue, the satellite I point at does not work with version 6 of their software - only the technicians on the other end of the phone forgot to mention that) - I had only one major stumbling block.  It wasn't due to the satellite, but rather due to the Belkin Pre-N Wireless router we got. That router puts out a good signal but unfortunately it won't work with my Cisco VPN software! It took quite the process of elimination to figure this out. It was sort of like determining a database performance issue - you have to rule out lots of stuff.

I plugged into the wireless network and tried to VPN, no joy. So, I plugged directly into the satellite modem (suspecting it was the satellite - and that would have been a big bummer). Plugged directly into the satellite - it worked perfectly, so that was not it.

Next tried being cabled into the wireless router.  That is, use the router like a hub and just be wired into it. Surprisingly - this too worked. But it wasn't relevant that it worked - for the router is too far from my office to run a cable (that was the point of the wireless router after all).

So, unplug the cable and try wireless - no joy, VPN connects but I cannot hit any machine inside of Oracle at all. That confirmed for me that it was the wireless part of the wireless router.  Hit google - search and search and the only thing I can find is "I can VPN in when cabled into the router, but not wireless" type messages (usually followed up by "and support at Belkin is less than useful". So, I see others have had this issue with the Cisco VPN client - but no resolution.

I happened to have had a cheap $40 netgear wireless router (mr814v2) in my drawer, so I plugged that in, configured it - and hey, VPN works. The signal strength is not as good as it was before (down to "good" from "excellent" in my office) but - it works.

So, let me ask you a question - do you use a wireless router with a Cisco VPN client.  And if you do, and it is a good powerful one and you would recommend it - what is it?  Model number and all...

Friday, September 23, 2005

Back from OOW

Long week, voice is a bit gravelly sounding and I'm tired. But, I'm not complaining - it was a good week all in all. Very good. Got together with long time friends and new ones as well.

I met so many people this year that I've "talked" to but never "talked" to if you know what I mean. Putting the faces to the names was great. I had my last "meet and greet" session yesterday and was expecting a really small group (the conference was almost over). Instead about 35 or so people turned up, even though the "meet and greet" events were not advertised well (and the OTN lounge was "out of the way", not in the main stream). We had a really good hour long session (started early, finished late).

The attendance at the conference was large to say the least. I think I'd like something smaller and more personal, put too many people together and simple things like taking bio-breaks becomes a huge event.

Tired, but back home. Started the trek at 4:30am this morning (been home about 4 hours) pacific time - in hopes of sleeping on time tonight.

I am realizing however that at the rate I'm reading Atlas Shrugged - it'll take a couple of more flights before I'm done. The font in this book is about as small as they get and the page count is just over 1,000. I'm liking it so far.

Normal programming to resume this weekend...

(Mark Rittman has a good closing write up...)

Wednesday, September 21, 2005

Podcast Released

A podcast I made this week at OOW is available on otn. ...Tom Kyte talks about how to answer questions, how to ask questions, how to take corrections, how to get consensus on the top 10 features in Oracle Database 10g Release 2, and his favorite thing about Oracle OpenWorld 2005 so far....

I'm being nitpicked on!

Bill S. pointed this out to me, thought it was very funny.

Maybe I need to get the nitpicker to edit the next part of the Expert One on One Oracle rewrite.

Mark Rittman on the blogger dinner

Mark Rittman uploaded some photos of last nights dinner.  It was great - I knew some of the people "face to face" (Steve Muench, Sue Harper and Mark) but not the rest of them.  It it always nice to put a face to the name - to see what the people actually look like.

Yesterday I had an OTN "meet and greet" session in the OTN lounge.  The size was perfect - just about 20 people showed up and we sat around and talked for about an hour/hour and a half. Gave away some books and t-shirts and everyone seemed happy, myself included. Everyone that came pretty much participated.  Mark Rittman did his this morning and had a similar pleasant experience. I have one more tomorrow morning at 11:30 am for anyone that wants to just come down and talk (Moscone Center West, ground floor).

Apress arranged for a book signing in the book store today from 12:30-1:30.  The traffic was great, a nice steady stream - got to meet even more people whose names I recognized.  That perhaps is one of the best parts of this week - getting to meet everyone.

Anyway, OOW is more than half over now - but going strong. Just me and 35,000 other people walking from place to place (it is huge).

Tuesday, September 20, 2005

OOW - The presentation is done

The moment I've been waiting for. The presentation is complete. Had a really good turnout - room sat over 1,000 and the room was full (takes a while to get that many people seated). We finished on time, had good questions at the end.

Thanks to everyone that came

Getting them back

It was funny what got spontaneous applause this year. It was one of the honorable mentions (extras we added at the end, things worth mentioning) - DBMS_OUTPUT. First it has no 1,000,000 byte limit anymore and 2nd it has no 255 characters per line limit either. Both got a wave of applause and a cheer.

Amazing how you can add all of this fancy stuff, but yet the thing that was most appreciated was DBMS_OUTPUT ;)

Mark Rittman wrote a bit about today as well...

Well, off to a customer meeting and then a meet and greet session at the OTN lounge. Recorded a podcast which should be available on otn.oracle.com tomorrow morning

Power outage in Reston Virginia

Which is where the servers that host asktom are located. The external access to the internet is powered off right now. They are working on it.

OOW - presentation day

Today I have my session - Cary Millsap and I will be co-presenting. Our topic is the top ten things about Oracle 10gR2 - but we couldn't decide on just ten so it is really eleven plus some honorable mentions.

The topics we'll be hitting with discussion and demonstration will be: 

  • Conditional Compilation in PLSQL
  • Better trace file information (in the raw trace file, timestamps on wait event records)
  • Full Database Transports
  • XQuery
  • Asynchronous Commit
  • SGA Direct Attach
  • Transparent Data Encryption
  • Transporting AWR data
  • LOG ERRORS clause
  • Audit trail in XML format
  • Online Tablespace Transport

The honorable mentions include - autotrace using dbms_xplan (much better output), dbms_output limitations removed (unlimited output and 32k line widths), restore points, automatic failover with standbys, datapump metadata compression and secure backup.

Nervous. Big big room. Little sleep last night, up very early this morning. Normal life resumes at noon west coast time (after the presentation)

Monday, September 19, 2005

What books are on your bookshelf

Which Oracle books are on your bookshelf? Which books do you use/refer to on a regular basis (other than the Oracle manuals)? Are the books on the 'Links I Like' page your bookshelf?

My main bookshelf is online, the Oracle documentation set. I travel with 2.73 gig of Oracle documentation covering Oracle 7.3 on up. I use that all of the time.

In addition - I have every book on the links I like (I won't review/recommend a book without having read it). The transaction processing book isn't used much anymore (I have those concepts down). I refer to Practical Oracle8i by Jonathan Lewis from time to time - to look up something I know he said and refresh my memory. Cary's book Optimizing Oracle Performance was a cool read - it is nice to read something you agree with so much of.

I was a technical editor/reviewer on Mastering Oracle PL/SQL (another "yes, yes, I agree" book for me) as well as Effective Oracle Database 10g Security by Design.  The Effective Security is another book I use as a reference from time to time.

Oracle8i Internal Services for Waits, Latches, Locks and Memory is another one I've had for a long time and still refer to today (very short, perhaps the smallest book I have).

Oracle Insights - just for fun and a little education, but for fun.

Oracle SQL*Plus, The Definitive Guide 2nd Edition - definitely.  I was a tech editor/reviewer on that book and wrote a blurb for the back.  I wrote words to the effect (don't have it with me here at Oracle Open World) "I learned a thing or two new about SQL*Plus reviewing this book" - and I live in SQL*Plus. Good stuff if you want to master that command line interface.

On my bookshelf you would also find a lot of books not related to Oracle.  Lots of Science Fiction, some mystery/detective stories and the like.

What am I reading right now? I never read Ayn Rand's Atlas Shrugged so I'm going through it now.  It is big (if you think they used a small font on expert one on one Oracle - my copy of atlas shrugged beats it hands down).  Just got started on it on the way out to OOW.

Sunday, September 18, 2005

OOW - Registration

Just registered at OOW. It'll be a long week. Put the finishing touches on the presentation and scripts... Everything seems to work now, but you know, I think software has a shelf life and can go stale (so i'll be testing them again)

This year doing something a little different - I'm going to co-present with Cary Millsap. Should be fun - but we do need to practice.

Anyway, I hope to get to meet with many people this year. They set up a book signing in the bookstore as well as two "meet" session - one on tuesday and another on thursday.

Tonight is the Oracle ACE dinner - looking forward to meeting some of the others I haven't met in person yet. Also Mark Rittman set up a "blogger" dinner on tuesday that promises to be fun (too much eating at these things).

As the week goes on, I'll be updating the site here with details...

P.S. According to Alberto Dell'Era, the book is shipping... And Amazon now ships "usually ships in ..." instead of "this book hasn't started shipping yet"!

Friday, September 16, 2005

Question

What do you think is the way to go to become a successful Oracle professional?

I'm asked this from time to time and was just asked in email this morning. I'd like to broaden the question a bit.

What do you think is the way to go to become a successful professional?

I think that gets to the heart of the matter more than anything. Some things I would recommend

  • Be involved, participate. I cannot stress that one enough. Participate, become known. A little over 10 years ago I started (1994). I can safely say participation (helpful participation) contributed greatly to my progression.
  • Understand.  It is not good enough to think you know how something should work according to you.  You have to understand how it actually does work.  What you believe to be the way something is implemented could be far from the truth as to how it actually is implemented.
  •  Remember, you probably cannot get burned out if you do something you really enjoy.
  • Ask WHY whenever you don't know why. We could just shorten that to "ask". If you don't ask, you'll never know.  If you are answering questions and don't ask some yourself - you are doing it wrong.
  • Trust but Question Authority. If you see something written as a statement of fact without any supporting evidence either ignore it entirely or if you feel it could be beneficial to you if true develop a method to test the concept and see if it holds true.
  • Beware ROT, Rules of Thumb.  They let you down at the most in-opportune times.
  • If you want to be successful, you'll be communicating.  Be precise in that communication. It really does make a difference.  Clarity is necessary and preciseness is mandatory for clarity.
  • When you participate and start giving your own answers, your own input - do it right. (and remember, talking down to people, that doesn't make them want to come to you for information, you want them to come)
  • Read, Question, Experiment, Read some more.
  • Did I say participate?

That is my short list. Some of it has nothing to do with technology and everything to do with people. Participate, be Motivated (like what you do, do what you like), Trust but Question, Ask - in the right way, Answer - properly, Preciseness counts, ROT burns you when you least expect it - so always Understand how something works so you can know when to apply ROT and (more importantly) when NOT to apply ROT.

Thursday, September 15, 2005

The Book has landed

I did not think it would arrive before Oracle Open World, but it did. I got my copies of the book last night:

The Book

It is a good feeling to have the book fnished, printed and becoming generally available. The print job looks really good, the paper is thicker than Expert One on One Oracle was (less pages, thicker paper). The print is very crisp and clear - paper is very white, print very black.

They let me keep my look and feel, which differs from a normal Apress book. The code examples are black on grey which clearly sets them apart from the text itself - makes them stand out. I really like the way it looks and feels. The binding seems very secure, overall the physical book did not disappoint me at all.

They should start shipping soon.

Tuesday, September 13, 2005

Wow, that was cool!

Went to the Carlyle in New York city last night for dinner and some jazz music. You can see who the main attraction was - Woody Allen himself. It was very cool - been planning it for a while now.

Melanie, who you've seen post here from time to time, set it up (thanks!) Melanie, my wife Lori, and an old friend Jeanie from college went. It was a blast.

Of course we stayed out way way too late - but it was worth it for sure.

Now just waiting for the train back to home...

Added later this evening.... More pictures...

Sunday, September 11, 2005

Trust

I received the coolest email ever the other day. It was from Kathy Sierra. She was saying thanks for the link (not the first time I linked) to one of her entries. She said something very interesting to me:

I'm not in the Oracle world at all, but I have to say that when you post a link to my blog, my stats go crazy. So besides enjoying your writing, your readers obviously trust what you say.

That was one of the nicest things I've had said to me and a unique way of measuring 'trust'. Her premise was - others link to her, but the clickthru rate is not always significant, given that when I linked, her hits showed it - there was something going on there.

When I was in Iceland, Gunnar Bjarnason with whom I was staying made a statement that was very similar in nature to me (probably a famous quote, I've seen variations of it with different things in place of good reputation, I'm sure if it is someone will point it out)

It takes a long time to get a good reputation, but only takes seconds to lose it.

I think that is so true. And the two go hand in hand.

Trust, but Verify, Question, Argue, Critique, Disagree. Always question. Never assume the "name" is correct just because it is the "name". Trust but question.

Trust comes with certain responsibilities I think - if you want to maintain that trust. If indeed someone does trust me, and I want to preserve that trust, it is all in my hands. The trusted person holds all of the options here.

I think open, unedited commentary is part of this. When asktom first started, I did not have the followup capability. In fact, as evidenced by the very first ever followup, it was about a year before I started doing that. That one addition is what I think makes it all work. Funny how one little addition like that was so pivotal in the end.

People have said that I have patience (usually!) when answering a long series of follow up questions. I think that is mostly because if it took that long series of followups to get the point across - it was probably my fault. I didn't say it right in the first place. I know this is a cliche, but I don't think there are dumb questions about Oracle, just unasked ones. If there is one thing I can talk about without getting sick of talking about it, it is probably my kids (and the database, bet you thought that was what I was going to say :)

You know what makes me laugh out loud sometimes? When I'm upstaged totally by someone saying "why didn't you just do this". My favorite recent example wasn't too long ago. Some asked a question about "carrying down" the last non-null value in a result set - they had sparse data and needed the last non-null value in a column carried down after sorting the results by date. I said "easy, here you go:"

SQL> select dt, val
2 from t
3 order by dt;

DT VAL
--------- ----------
04-JUN-05 168
05-JUN-05
06-JUN-05
07-JUN-05
08-JUN-05 157
09-JUN-05
10-JUN-05
11-JUN-05
12-JUN-05 75
13-JUN-05
10 rows selected.

SQL> select dt, val,
2 to_number(substr(max(max_val)
over (order by dt),5)) max_val
3 from ( select dt, val,
4 case when val is not null
5 then to_char(row_number()
over (order by dt),'fm0000')||val
6 end max_val
7 from t ) order by dt
8 /

DT VAL MAX_VAL
--------- ---------- ----------
04-JUN-05 168 168
05-JUN-05 168
06-JUN-05 168
07-JUN-05 168
08-JUN-05 157 157
09-JUN-05 157
10-JUN-05 157
11-JUN-05 157
12-JUN-05 75 75
13-JUN-05 75

10 rows selected.

Now, if everyone was to just blindly trust without questioning - that would have been that. Game over. But, someone else read the documentation and said "Hey, this was 10g, why didn't you just:"

SQL> select dt, val,
2 last_value(val ignore nulls) over (order by dt) val
3 from t
4 order by dt
5 /

DT VAL VAL
--------- ---------- ----------
04-JUN-05 168 168
05-JUN-05 168
06-JUN-05 168
07-JUN-05 168
08-JUN-05 157 157
09-JUN-05 157
10-JUN-05 157
11-JUN-05 157
12-JUN-05 75 75
13-JUN-05 75

10 rows selected.


Now it is truly "game over". That is much easier (and more efficient and so on...) and is the right answer. I'm so glad the ability to provide commentary is there on asktom, otherwise I do not believe even half the content would be "correct".

Makes it more trustworthy.

Addendum: added after I noticed blogger put an _11 on this post url. That means I used this title before. In fact, way back in May I did. Same title, slightly different spin.

Saturday, September 10, 2005

Testing out mobile blogging again.

The treo 650 I just got has a regular qwerty keyboard on it - making typing feasible. I'm much faster on a real keyboard - but this beats the old phone by far.

The treo appears to have quite the following. treonauts they call themselves.

Now it just means I'm never disconnected from the network!

I think now I'll have to add wap friendly screens to asktom. It works as is (already did an answer from the phone just to see if it would work). Been thinking about a version two of asktom - but the list of new things I want keeps getting longer...

The blogging software referenced on that page is left hand friendly! The scrollbar is where it belongs :)

[Posted with hblogger 2.0 http://www.normsoft.com/hblogger/]

Lefties Unite

I broke my cell phone, dropped it and no more LCD screen. You cannot imagine how hard it is to make a call when you cannot see the screen (no more directory).

So, I went out and upgraded to a Palm Treo 650. Very nice, big screen, has everything I want - except the scroll bar is on the right hand of the screen.

Well, guess what, if you are left handed - where do you think your hand ends up?

Yes, that would be right over the entire screen. Makes scrolling somewhat difficult as you have to wrap your arm/wrist/hand around the entire device to do it. Or become right handed, which isn't going to happen.

Tried "lefty", a palm preference. Too bad not a single application I actually use obeys it.

Tried Scrollbar5, it can "force" the scrollbar in some applications (but not blazer the web browser which is sort of where I need it most).  I tried Xiino as a web browser and the scrollbar can be forced - right on top of the first 2 or 3 characters of each line!

Ugh.

How hard would it be (I'm sure there are some left handed developers out there) to have the Palm OS let us pick where the scroll bar is?

Don't even get me started on power tools (I think there are fewer lefties than righties because us left handed people die in horrible power tool related accidents). Take a look at your circular saw sometime (I know, you can get left handed ones - sometimes).

Now, I'm just sort of dragging my thumb up and down the right hand side which seems to work most of the time (until you hit a button, a link, whatever).

Friday, September 09, 2005

This is funny

I saw this on a boingoboingo blog. My life made into a toy. Looks like a great holiday gift. If I picked up this one too, I'd feel right at home.

Of course, I'd need to round it out with a good ride.

All I had as a kid was some old gas station, how far we have come.

Thursday, September 08, 2005

Neat Idea, Thanks Rich

I saw this on another blog, TUSC is offering free technical services to systems damaged or in need of support due to the recent hurricane. You can read about it on the TUSC site as well.

I saw that and said to myself, that is pretty cool. Very nice gesture. It is good to see the good side of people, after seeing so much of the not so good side happening down there.

Rich, hats off to you.

Wednesday, September 07, 2005

A good blog

Even though she does lots of Java stuff, Kathy Sierra has a really cool blog. I really liked this one on writing. The graphics she uses are pretty funny too - really get the point across. I am somewhat "graphically challenged" myself - wish I could drop in a picture like that and make it work as she does.

The crux of her message was "write like you talk". I agree. In my writings, it is as if we were having a conversation (I hope). She points out a conversation she had with a "technical consultant" who claimed to have a "reputation" to protect - that writing like you talk was bad for your reputation. I don't agree at all. If a book (any book) doesn't grab me right away, isn't fun to read, I'll never make it through it. That consultant with the great reputation, I'll not read their material.

I'm curious - what authors out there (technical books) do you think come across conversational and 'fun' to read? (please don't list negative ones, just looking for 'fun to read')

Tuesday, September 06, 2005

If you blog

And would like to participate in a survey about the experience (it was fairly painless) there is one online. I recieved this email from a University and am glad to help them in their endeavor:

We would like to request your help as an active oracle Weblogger. Would you be so kind to announce our survey in your weblog. It is a very short survey (3-5 minutes) about the influence of weblogs on knowledge work. We think that it will help webloggers to understand, what they really do.

If you have any chance to announce our survey on your weblog or to forward the survey to oracle-bloggers, we would be very grateful. Please access the survey here: http://www.adenquire.net/pd5g0022/

 Be sure, the scope of the questionnaire is academic and non-profit. The data you submit are kept strictly confidential and anonymous. Thanks for taking your time and please feel free to forward this survey to persons that might be interested. Best regards, and thanks for support and participation,

Stephan and Gordon

 P.S.: The summarized results of this survey will be published on our website http://www.ku-eichstaett.de/Fakultaeten/WWF/Lehrstuehle/OP

 

Saturday, September 03, 2005

Archive Log Mode

If I've said it once, I must have said it a billion times. Running a database in noarchivelog mode guarantees one thing and one thing only:

You will someday lose all of your data since your last full cold backup. Not might lose, not could lose, not likely will lose, not probably will lose - It means you WILL lose all of your data since your last full cold backup someday. (assuming of course, you haven't messed up your backups, in which case - you just lose your data period)

It happened again (sort of like clockwork). I believe I get an email like this once or twice a week at least.  I feel sorry for them, but there isn’t too much one can do. I just got back from the Czech Republic last night, forced myself to stay up till 10pm east coast time (4am Czech time) but still got up on 5am and couldn’t get back to sleep.  So, at 5:30am this morning, I read this (paraphrased):

We have one database in NOARCHIVE under version of xxxx. During night process heavy process is going on which is running since last 3 hrs. suddenly power was gone, UPS also not working. After receiving power when we start the database is is not started and giving following mess. We haven't any backup also. Backup was taken before 11 days back. If it is not recovered then, 11 days data entry will be made once again.

I feel really sorry for them, but I mostly feel sorry for the people that rely on this data – not so much for the DBA and technical team that

  • made the conscious decision to run a production system in noarchivelog mode
  • backs up so infrequently

They made these choices, purposely. 

The only thing I can tell them now is “open a tar with support and see how much data you can scrape out of this instance” (I said that in this case based on other information in the email, I know the “fix”, we can get the instance open but only long enough to scrape out possibly inconsistent bits of data). I personally do not give recovery advice via email and tend not to do it on asktom either.  You have to rely too much on the knowledge level of the person on the other end of the internet connection – far too easy for them to do something you never anticipated them doing and to REALLY mess up something big time.

Archivelog mode, it is the only thing that stands between you and your ability to recover your data in the event of a failure (well that and practice, practice, practice and – a test or two or three hundred).

Thursday, September 01, 2005

Part III Why Is a Restart Important to Us?

Part III, Why Is a Restart Important to Us?

The first thing that pops out should be “Our trigger fired twice!” We had a one-row table with a BEFORE FOR EACH ROW trigger on it. We updated one row, yet the trigger fired two times.

Think of the potential implications of this. If you have a trigger that does anything nontransactional, this could be a fairly serious issue. For example, consider a trigger that sends an update where the body of the e-mail is “This is what the data used to look like. It has been modified to look like this now.” If you sent the e-mail directly from the trigger, using UTL_SMTP in Oracle9i or UTL_MAIL in Oracle 10g and above, then the user would receive two e-mails, with one of them reporting an update that never actually happened.

Anything you do in a trigger that is nontransactional will be impacted by a restart. Consider the following implications:
  • Consider a trigger that maintains some PL/SQL global variables variables, such as the number of rows processed. When a statement that restarts rolls back, the modifications to PL/SQL variables won’t “roll back.”
  • Virtually any function that starts with UTL_ (UTL_FILE, UTL_HTTP, UTL_SMTP, and so on) should be considered susceptible to a statement restart. When the statement restarts, UTL_FILE won’t “un-write” to the file it was writing to.
  • Any trigger that is part of an autonomous transaction must be suspect. When the statement restarts and rolls back, the autonomous transaction cannot be rolled back.
All of these consequences must be handled with care in the belief that they may be fired more than once per row or be fired for a row that won’t be updated by the statement after all.

The second reason you should care about potential restarts is performance related. We have been using a single-row example, but what happens if you start a large batch update and it is restarted after processing the first 100,000 records? It will roll back the 100,000 row changes, restart in SELECT FOR UPDATE mode, and do the 100,000 row changes again after that.

You might notice, after putting in that simple audit trail trigger (the one that reads the :NEW and :OLD values), that performance is much worse than you can explain, even though nothing else has changed except the new triggers. It could be that you are restarting queries you never used to in the past. Or the addition of a tiny program that updates just a single row here and there makes a batch process that used to run in an hour suddenly run in many hours due to restarts that never used to take place.

This is not a new feature of Oracle—it has been in the database since version 4.0, when read consistency was introduced. I myself was not totally aware of how it worked until the summer of 2003 and, after I discovered what it implied, I was able to answer a lot of “How could that have happened?” questions from my own past. It has made me swear off using autonomous transactions in triggers almost entirely, and it has made me rethink the way some of my applications have been implemented. For example, I’ll never send e-mail from a trigger directly; rather, I’ll always use DBMS_JOB or the new Oracle 10g scheduler facility to send the e-mail after my transaction commits. This makes the sending of the e-mail “transactional”—that is, if the statement that caused the trigger to fire and send the e-mail is restarted, the rollback it performs will roll back the DBMS_JOB request. Most everything nontransactional that I did in triggers was modified to be done in a job after the fact, making it all transactionally consistent.

The end…