Sunday, March 27, 2011

Tanel Poder's Online Seminars

What are good ways to learn about the inner workings of Oracle to troubleshoot performance and availability issues?

Fortunately there is only one good answer - just one good source - Tanel Poder's virtual seminars at

Why? Let's examine the typical objectives and the various means to accomplish them. I'm sure you have heard this complaint before - "the database is slow". If I had a dime every time I heard it, well ... you know the rest! Most DBAs by now know the next best thing they should do - check the wait interface - V$SESSION. That's a very good first step.

From the view they figured out the session is waiting on cache buffer chain latch, and has been waiting 1234.56 seconds, measured to the precise microseconds and counting. They also got all the other data such as session Id, the statement and so and so forth. But then what? It's like a radio host reporting the stick market - x number of stocks are up, y are down, Dow is up by n, Nasdaq is down by m, and so on. All are factually correct; but none helps you in answering your question - why  your specific portfolio of stocks is down and what other stocks you should consider.

Of course, you have to pay a professional to get that information. In your database issue at the moment, that's what you have to do as well - you have to be a professional to decipher the further information. And that's the vital second step. After you identified what is the ailment, you have to understand how to eliminate that. Most seasoned professionals stop at the first step when the second step is the most important. And that's where you need Tanel's highly acclaimed Advanced Oracle Performance Troubleshooting seminar. It's not based on slides; but showing the demos right in front of you, using code you can understand and reuse.

In this specific example, in the first part of his series, under the section "Latches" he shows you how to get the specifics of the latch, for instance the latch children. There are some traditional fixes, of course; but the big question is what if (and, that is a big IF) these well understood fixes do not work? What do you do next. Pray?

No; turn to Tanel's class. He explains how to get information from various sources inside the database. In this case the trick is to find out who has the latch and who is waiting for it, and what specific latch is so popular. This picture helps (from Tanel's class). Reproduced with permission:

As they say, a picture is worth thousand words. Now that you know how to find that popular latch, you are well on your way to troubleshooting. Hopefully this is all you have to do.

But what if it's not. The problem still eludes a solution? Have no fear. In his hang analysis section, Tanel talks about taking system dumps and explains how to analyze them - again with a few slides; and showing the actual trace file and interpreting the file right in front of you.

Talk about tough luck; suppose the problem is still not solved. Tanel takes a process stack dump. Yes, it is not for the faint of the heart; but with the right training anyone can do it. He shows you how to take the stack trace and analyzes one right in front of you. Here is an example of how to interpret the stack trace (reproduced with permission)

And he explains each section with how to interpret the different data to come to the solution.

At this point no problem is big enough to stand this type of scrutiny. If the problem persists, well, it's most likely a bug then. Oh, yes, Tanel will state the bugs that could affect performance issues and point to the MetaLink notes as well.

Interested? I guess more like excited. I certainly am. Tanels' first class is running April 11-15 It's a virtual class; so you don't have to step away from wherever you are, in whatever state you are in. As long you have the internet connection and an agile mind to absorb the superb information presented, you are in for a massive dose of superior learning.

What about the scripts Tanel uses in the class? Are they proprietary? Do you have to buy them to use them? Do you need to write them down so fast that you capture all the details? Not at all. As a part of the course, Tanel will expose his entire script library to you.

Intersted? Oops; I lied! Actually the scripts and tools are all free, even if you don't attend his class. They are at Download to your heart's content.

So, why is Tanel giving away his hard work for free? Well, buying the best tool from Home Depot will not make me a good carpenter; I must learn how to use them to build a deck. A script is only 20% of the solution; the rest 80% is knowledge. And the 80% is what Tanel's virtual seminars are all about. Hope you make the right choice. I know I have.

Speaking at a Virtual Conference #VirtaThon

I was putting together abstracts for Oracle Open World #oow11 this year and remembered something someone had asked me earlier - to present at a conference like this, how does one overcome the fear of delivering a session? In fact, it is a question asked of me several times.

This is not a trivial issue; it's a real problem. There are many folks who are otherwise excellent sources of knowledge, in fact fountains of practical ideas; but when asked to speak in front of a live audience, they would rather kiss a frog than step in from of the podium. The mortal fear of public speaking is one of the many challenges to get good speakers for conferences.

The second challenge is cost. Conferences are conducted at some physical place. Unless you live in that city, or within commutable distance, you have to travel there. Add to the plane fare, cost of hotel, food, rental car, and all that extra expenses the emotional turmoil of being away from the family, especially those folks with small children who would miss one of their parents a is not something you can just brush aside. Even if you are  not a parent, you may be a caregiver to a loved one and your absence will be hard on the cared one.

Finally, the change is not something most people like. You may be comfortable with your present surroundings, among familiar people you work with every day. Traveling to a new city and spending time with strangers may be exciting or daunting based on how you look at it. Perhaps you work from home everyday in your PJs. Getting the wrinkles off the pants to go to the conferences may be a lot. At least to some people.

The answer to all this may be a trend I see developing now - web based conferences. You can attend them in your PJs and speak at them in your PJs as well; no iron needed. One such conference is #VirtaThon ( where several speakers, most of them widely known in the Oracle user community are speaking. Being a virtual conference, you don't have to travel anywhere to attend the sessions; you attend from the privacy and comfort of your own home or office. Remember, they are *not* webcasts; they are virtual conference sessions. So you actually participate in the sessions as you would do in a normal conference - ask questions, interact via chat and have follow ups after talks. If you are a speaker, there is nothing better - you don't have to travel to the venue. You need a computer with an internet connection. If you are uncomfortable speaking to a very live audience, it should be much easier speaking to virtual audience.No traveling, no TSA checks and no red eye flights.

Just to pique your interest, here is just a sampling of the speakers (in no particular order)

  • Dan Hotka
  • Bert Scalzo
  • Riyaj Shamsudeen
  • Syed Jaffer Hussain
  • Steven Fuerurestein
  • Jeremy Schneider
  • Guy Harrison 
  • Brian Huff
  • Lewis Cunningham
  • Mike Ault

And many more. Oh, I am speaking as well.

Interested? Submit an abstract at as soon as possible. The deadline is approaching fast.

Oh, yeas, a little detail. You will not be speaking for free; you will earn money for your efforts. So, what's stopping you?

Saturday, March 19, 2011

Review: Oracle Application Express 4.0 Cookbook

I decided to add a twist to my usual blogs - a book review, which I have not done before. I have been reading a book - Oracle Apex 4.0 Cookbook by Marcel van der Plas and Michel van Zoest and published by Packt, a UK based publisher. Michel is one of the first Apex Certified Experts in the world - a no small feat. It has been technically reviewed by a well known cast - Oracle ACE Director Dimitri Gielis, who also won Oracle Magazine's Apex Developer of the Year in '09; Maarten van Luijtelaar and Oracle ACE and frequent blogger Surachart Opun.

Why Apex

Back in the early 90's there was a product called SQL*Forms - for those who are old enough to remember that.  Up to verion 3.0, the source code, known as .INP file, was a text file. It was a breeze to generate a form to show data and even do some rudimentary editing. Since the source file was in text format, we used to open the file in vi editor instead of the required Forms Designer and add other fields and records. It was very convenient not just for non-SQL savvy users; but for us as well, to examine and easily fix incorrect data. It certainly beat writing long SQL statements. It was, in a way, one of the original Rapid Application Development environments for Oracle database.

Forms 4.0 changed the convenience factor a little - the source file was no longer text and hence not editable by vi. We had to open the form in the Designer. However, the value proposition of the Forms product as a rapid application development tool remained. It was still possible to create the perfect quick edit tool or a quick application for the non-SQL savvy user in a jiffy. In fact the added "true" graphical interface was a competition for the more popular GUI tools of those times.

Over the course of time, the product ceased to exist by itself. With the advent of the web environment, inclusion of Java and the three tier execution model, Forms assumed a more sophisticated avatar. Rather than being a standalone product, it had to have a crutch in the form of Application Server. While that undoubtedly added reliability, scalability and brought it to the realm of real web development, it took away the convenience of the rapid application development by the non-developers such as DBAs.

That was so until about fifteen years ago, when Oracle introduced WebDB, a database development tool. Later it morphed into a product called HTMLDB, which blossomed into Oracle Application Express. It not only brought web development to Oracle database, it afforded quick application development, and even development of applications by users - end-users; not DBAs or developers. This shifted the whole paradigm in favor of the users, enabling them to roll out apps without mush dependence on their more "skilled" colleagues.

The Book

Now back to this topic. Application Express (fondly called Apex) is pretty well documented and has been around for some time. It has matured as a product and seen its share of coverage in the IT circuits. There is no dearth of books, articles, blogs, code samples, etc. about Apex. So, with all that in place, how long will it take you to create your very first application (assuming you know reasonably about Oracle)?

You might be surprised to find that it will take a while. The manuals and normal books are usually geared towards imparting knowledge about a specific topic - Apex in this case. Quick start is not usually the objective. It's somewhat like the difference between all_rows and first_rows hints.

In addition, most books are designed to build up knowledge through a series of logical steps - starting with concepts. It's very important to understand the concepts to build a strong foundation. However, there will be days when you want to know just how to do a certain stuff. It's like checking a dictionary for the meaning of a word, rather than reading a book about improving vocabulary, or learning about its etymology. It could happen to anyone - beginner or a seasoned professional. I know; I thumb through my own book - RMAN Recipes whenever I am stuck with a task. A cook book format work well. This book is exactly that - a cookbook of recipes which you can quickly refer to instead of spending the time in looking where exactly that is covered.

Detailed Review

  1. Apex is a GUI environment; so a book has to have a lot of screenshots to explain things properly. This book does not crimp on that aspect.
  2. It has a very useful four section approach for each recipe.
  3. * Getting Ready - the preparation
    * How to Do It - the actual work
    * How it Works - explanation of the work
    * See Also - more information on the topic
  4. It starts with how you can start with a simple form from the EMP table. It cleverly points out that 
  5. It has recipes to manage several off the shelf utilities, e.g. Google Maps.In most applications today, maps are a choice du rigueur, not just that have a geo-spatial element in them.
  6. It handles creating apps in different languages, which is very useful in many cases.
  7. If you are already an expert in Apex, you understand how important it is to develop and distribute plug-ins. This book provides the easiest explanation of plug-ins and how to develop them.
  8. Using APIs and Webservices is explained lucidly.
  9. Finally, one of the thorniest topics - managing Apex environments - has been adequately covered in two chapters.

All in all, this is a solid book to keep for beginners and advanced users alike. I am sure you will like reading this book. I am definitely keeping it as one of my carry along books (I have the e-Book)

Wednesday, March 16, 2011

RAC One Changes in Patchset

Oracle patchsets used to be simple - they were bugfixes only; no additional functionalities were added. Oracle added stuff quietly in patchset (the workload capture); but that was part of a new functionality anyway.

The patchset changed all the rules. Several new functionalities were added to the patchsets. Several functionalities have been added to RACOne. Unfortunately they didn't make it to the manuals. Some of them I discovered only recently. If you have been using RACOne, or considering it, you will be delighted to know these.

(1) Bye Bye Patch - In RACOne was supported; but you had to apply a patch 9004119 . Well, it was confusing at the best. A favorite interview question on RACOne fo rmany way this patch. It's gone; already has the patch.

(2) OMotion - remember the OMotion tool used for relocating the database instance? It was probably modeled after the functionality of VMotion in VMWare; hence the namesake. However, it was completely redundant. The clusterware has the functionality anyway; and RACOne has the clusterware; so I never understood the need for OMotion.

In, it's gone. To relocate database instance from one server to another, you simply issue srvctl relocate command.

$ srvctl relocate database -d DBNAME -n

(3) Creation - no need to create the RACOne using raconeinit script. DBCA can create it. Oracle Installer can install RACOne as well.

(4) Status - Earlier you had to use raconestatus command to know the status of the RACOne database. This is no longer needed. You can use srvctl status or crsctl status commands.

(5) Upgrades - upgrading RACOne? DB Ugrade Assistant is aware of RACOne as well.

(6) Conversion - Converting a database to RACOne? SRVCTL comes to rescue:

$ srvctl convert database -d ....

(7) Data Guard will work on RACOne as well.

Friday, March 11, 2011

New York Oracle User Group DBA SIG Webcast

Thank you all those who attended my webcast "Deferred Statistics and SQL Plan Management for Performance in Oracle 11g" for the DBA SIG of New York Oracle User Group. The recording will be available on that website sometime later. In the meantime, here is the zipfile with the slides and the scripts I used for the demo, if you are interested. The script names are referenced in the slides.

This was the first time NYOUG used webcasts for the SIG meetings. I was the guinea pig for the experiment. I paid a little in the way, though. There were technical glitches for the first 10 minutes; and there some annoying background noises for the first 45 minutes. But considering this being the first webcast, I think NYOUG handled it pretty well. Thank you, Simay.

As always, please let me know how you liked it, or didn't.

Good Engineering

It's heartbreaking to watch the folks killed, wounded and displaced by the earthquake in the Pacific Ocean. The fury of nature mostly focused on Japan. Surprisingly the damage was not as much as expected in Tokyo. The big city was rattled, nevertheless, but relatively unscathed compared to the lesser known towns and villages. the casualties would have been unthinkably large had the buildings buckled in Tokyo - one of the cities in the world with highest population densities.

How did Tokyo manage to evade the inevitable? Someone twitted - Millions saved in Japan by good engineering and government building code. How profound. Not to belittle the unfathomable suffering of the victims, I couldn't help but think about the parallel to my own profession.

Engineering is not about being superficially creative; it's about reliability and trustworthiness. What good had been to build the highest tower in the world if that toppled over killing thousands and destroying far more in property? The true appreciation for engineering comes if something does not happen when things don't go as expected. When building a database infrastructure, or managing one, the true effort of a DBA is manifested in things that do not occur. Corruptions do not happen, rather than recovery being a necessity, or, security breaches never occur as opposed to scrambling to contain the damage of a breach. When things don't happen, the DBA is likely doing his or her job most effectively. It's not flashy webpages, or nice reports; it's plain simple non-events that differentiates [to borrow from the oft-repeated and near-cliche] men from boys.

I have a simple mantra (well, actually one of several) - success is not an accident; it's planned. Carefully planned engineering artifacts saved the day. Carefully planned processes save the organization from the perils of life - be it tsunamis or attempted credit card thefts. The success of the projects I execute, I believe, depends on how well it was planned - how prepared I was for all contingencies. There are three very important things in any project - details, details and details. Sometimes people around me get a little impatient that I pay too much attention to planning and details before starting the action. Well, without detailed analysis, I don't see how you can succeed in a project. Dumb luck, may be; but definitely not because of effort.

One of the other overlooked factors in success is standardization. It goes for building a good layout or an architectural plan that influences future projects. For years, I have been developing and enforcing strict guidelines in my own organization, to address this eventuality - just in case. Time and again, it has proved invaluable by preventing small and large mishaps, just like the building codes did in Tokyo.

Because of what the engineers did, Tokyo was spared; not because of its good luck. Millions of people should thank the unsung heroes that made it their mission to pay attention to the detail and plan very carefully. And scores of CEOs, CIOs and shareholders should thank the unsung heroes in their own organizations who saved them from corporate perils by making sure nothing happens.

Planning ... details ... boring; but important. Not something you will see in headlines, sadly, though.