Wednesday, October 14, 2009

Oracle Open World Report for October 11th and 12th

As I am attending Open World 2009 on blogger credentials, it seems proper I should  actually blog about it.

So, here it is.  I won't be blogging about keynotes or other things that will appear in the news the following day, but rather on some of the sessions I attend.

As I got back to my room too late and too tired to do this properly on Monday, I am putting Sunday and Monday in the same post.

Here goes:

Open World - Sunday 10/11/2009

While attending Oracle Open 2009, I thought it a good idea to make some report of sessions attended, and any interesting developments at OOW.

Some of the sessions I attended may not be considered DBA topics. I thought it would be interesting to break out of the DBA mold for a bit and attend some sessions that might be a bit outside the DBA realm.

Sue Harper - Everyday Tasks with Oracle SQL Developer

Sue Harper is the product manager for SQL Developer, and was presenting some of the useful new features of the SQL Developer 2.1 Early Adopter release.

While I have used SQL Developer from the time it was first released as Raptor, I have not until recently used it simply as a database browsing tool.  After exploring some of the features that allow writing reports with master/detail sections, I converted some SQLPLus scripts for use with SQL Developer.

SQL Developer is a very capable tool, so I attended this session to see what else I might be missing out on.

There was only one hour allocated for the session, and given the first 15 minutes were consumed convincing the audience why they should be using SQL Developer, there was just that much less time available to see the new features.

Taking a few minutes to market it is probably just in the product manager DNA.

Some of the features demonstrated were actually available in 1.5, but maybe not widely known.  As I have not used 2.1, I won't always differentiate between versions here. Some of these features may not be new to 2.1, maybe just improved.

Though not a new feature in 2.1, a few minutes were used to demonstrate the use of the built in version control integration. This is a very useful feature, and can be setup for seamless integration for CVS, SubVersion, Perforce, and one other I can't recall now.  It's definitely worth a look.

Some features that are new to 2.1 looked very useful:

Persistent column organizing and hiding.  When viewing data in SQL Developer, the columns may be easily rearranged and selected or de-selected for viewing.  While previous versions allowed dragging columns around, 2.1 has a nice dialog that makes this much easier.

New to 2.1 is column filtering.  By right clicking on a cell in the data pane, a dialog can be brought up to filter the data based on values found.  This allows filtering the data without requerying the table.

Also new to 2.1 is an XML DB Repository Navigator. It was mentioned, but alas there was not time to demonstrate it.

Christoper Jones - Python/Django Framework

This was a hands on developer session centered on using the Python scripting language with the Django Web application framework.  This was a fun session.  The lab was already setup, running Oracle Linux VM's with access via individual laptops setup in the training room.

The lab was a go at your own pace session, with instructions both printed and available via browser.  Browser based was the way to go with the instructions, as the examples could be cut and pasted, saving a lot of time typing.

I wasn't able to quite complete the lab as I kept encountering an error when running the web app.  It was probably due to an error in one of the scripts I modified during the session, but enough was accomplished to see that the Django Framework looked very interesting.  Perhaps even simple enough to use for a DBA.  Yes, I did search the schedule for a similar Perl session, perhaps using Mason or somesuch.

The training materials are going to be placed on OTN in the Oracle By Example section after Open World concludes.

Ray Smith - Linux Shell Scripting Craftmanship

The last session I attended on Sunday was all about shell script craftsmanship. Ray Smith was sharing some common sense methods that can be used to greatly enhance your shell scripts.

If you have done any software development, the information presented would be similar to what you already know.

  • Use white space and format your code for readability.
  • Don't be overly clever - other people will have to read the shell script.
  • Format your scripts with a header explaining the purpose of the script, and separate sections for independent and dependent variables, and a section for the code.
  • Use getops to control command line arguments.

Smith strongly advocated that everyone in the audience obtain a copy of the book "The Art of Unix Programming" by Eric S. Raymond.  This is not a new book by any means, but Smith drew upon it for many of the principles he advocated in scripting.

A couple of tools new to me were mentioned:

Zenity and Dialog - both of these are graphical dialog boxes that may be called from shell scripts in linux.

Dialog is installed with linux, so just do man dialog to check it out.

It was an interesting presentation.  Though a lot of it was not new to me, the two dialog tools mentioned were, showing that no matter how well you think you may know a subject, you can always learn something from someone else.

Open World - Monday 10/12/2009

Jonathan Lewis Unconference - How to be an Expert

Jonathan Lewis had an interesting unconference presentation.

In a nutshell, it comes down to this:

You must practice, and practice quite a lot.

To make the point, he used the joke about the American Tourist asking the grounds keeper how the lawns of the Royal Estates are maintained to be so lush, have such and even texture and in short, to be so perfect.

The groundskeeper explained while the tourist took notes.

First you must dig down 4 inches.

Then you must put down a layer of charcoal.

Then another 1 inch layer find sharp sand.

Finally a layer of fine loam goes on top.

You then must seed the lawn, and water it very well for 6 weeks.

After 6 weeks, you must cut the grass, being very carefully to remove only a small amount as you mow.  This must be done three times a week.

And then you continue doing this for 200 years.

Ok, everyone had a good laugh at that, but the point was made.

Reading some books and being able to run some scripts does not make you an expert.  Lots and lots of practice may make you an expert, if you apply yourself well.

During the presentation he asked a number of questions of the audience made up mostly of DBA's. I will reprise a couple of them here.

Q1:  Assuming you have a simple heap table, with no indexes, you update a single column in 1 row of the table.  How many bytes of redo will that generate?

Q2: Who of you in the audience when you insert data into a table, deliberately insert duplicate data into the database?

I will leave you to speculate on the answers a bit.

Of those 2 questions, only 1 was answered correctly by the audience.

Leng Tan and Tom Kyte DBA 2.0 - Battle of the DBA's

What is the difference between a DBA 1.0 (the old days) and a DBA 2.0 ( the modern DBA)

DBA 2.0 has modern tools, self managing database enabled by AWR and the Diag and Tuning packs.

DBA 1.0 uses scripts and works from the command line.

One the stage in addition to Kyte and Tan were two DBA's, each with a laptop and an oracle server to work on.

Two scenarios were presented for a timed hands on problem that each DBA must work through.

First scenario - Security Audit

Each DBA is given 6 minutes to do a database audit and report on possible vulnerabilities

DBA 1.0 ran scripts to check for open accounts, default passwords, publicly granted packages and umask settings.

After doing so he ran a script to remove privileges granted to PUBLIC, and locked a couple of accounts.

DBA 2.0

DBA 2.0 worked from the Oracle Enterprise Manager console, using the Secure
Configuration for Oracle Database.

He was able to observe the database security score, navigate through several screens and correct the same security problems that DBA 1.0 did.  Following that he was able to see that the security score for the database had improved.

So the conclusion made by the presenter is that OEM is clearly superior because OEM will automatically generate the needed data every night.

By contrast DBA 1.0 can only do one db at a time.

I do not believe this demonstration to be a valid comparison - it's quite simple to run the script against any number of databases from a script, and report on anomalies.

At this point it should be mentioned that DBA 1.0 spent 4 minutes explaining what he was going to do, another minute explaining what the scripts were doing, with less than 1 minute spent actually running the scripts.

By comparison, DBA 2.0 was navigating through screens through nearly the entire 6 minutes.

The statement was made by the presented that doing this with scripts at the command line was far too tedious a task, and DBA 1.0 would never be able to accomplish the task for 200 databases.

I won't belabor the point (well, not too much) but automating these kinds of tasks is relatively simple for command line tools.  Which is easier and more productive?  Automating a set of scripts to poll all of your databases, or navigate through OEM for 200 databases?

The present referred to using OEM as "really convenient"  Sorry, but I have never found OEM to be at all convenient.  Whenever I run into problems with it, it requires a SR to fix it.

Thetre was a round 2 as well regarding testing execution plans both before and after setting optimizer_features _enable to a newer version.  OEM fared well here compared the the scripting method as the scripts used 'explain plan' and OEM actually executed the queries to gather execution plan information.

That isn't to say however that the scripts could not be modified to do the same.  No, I am not completely against GUI environments.  I am just against making more work for DBA tasks.

Enough for now, I will report on Tuesdays conferences later this week.


Ric Van Dyke said...

Scripts Rock. However there is the "easy of use" issue. Knowing which scripts to use can quite a challenge. OEM can be "easier" to use, which doesn't mean it's more efficient.

Jared said...

Ric, I can appreciate what you are saying regarding the GUI.

Personally, I find it much easier document and/or locate the correct script than navigate a GUI.

There are undoubtedly others that find it easier to do than I do.

Anonymous said...

You have to love John Lewis, fabulous public speaker, always very entertaining and you always come away having learned something new, just wish I have more time and money to attend more of his lectures.

Scripts and GUI's, each has a place and an application. I don't think anyone worth their salt invests in just one or the other, but uses a combination of both. GUI's do bother me though, I much prefer the R/O aspects of OEM, quick glance at this and that is useful. I always worry my skill set will deteriate if I spend too much time with OEM! Scripts can get down to the nitty gritty and truly customise what you wish to know about, luckily OEM does allow you schedule your own custom scripts, so it's swings and roundabouts.

Great reporting on OW2009, keep it up!

fuaw said...

What about the DBA (sic) that only runs OEM and does not understand scripts, can not read/write scripts, nor comprehend the correct behavior of changing security or performance settings?

Surely OEM provides the business a net cost savings for this type of employee?


John Kanagaraj said...

When I saw Tom Kyte's name on this, I expected a face-off with an OEM DBA (DBA 2.0) on one side and Tom (DBA 1.0) on the other, and was disappointed that Tom seemed to support using OEM. I am not against OEM, but I do believe in using the right tool for the right job. The "battle" was lopsided and was built in a way to make the DBA 1.0 look archaic and old, and knowing Tom and his views, I wondered how he accepted being part of this "battle". To his credit, Tom did slip in a line at the end saying that "You should understand what you are doing using EM before doing it" which contradicted the whole point of using EM to hide everything under the covers :)


kyle said...

Graphics can be powerful when designed well. Case in point is the Performance page in OEM which I designed with John Beresniewicz at Oracle for OEM 10g. One of our favorite success stories was our colleague Graham Wood, one of the principle idea men behind Statspack. Graham was pretty anti-graphics and pro-statspack until OEM 10g's performance page. Story goes that Graham would require the OEM performance page be running on any internal database before he'd look at optimizing it. Here are some quick side by side examples of textual performance measurement verse graphic as well as explain plan verses Visual SQL Tuning (VST) which is what I'm working on now.

Jared said...

Kyle, I am not trying to make a case against visualization and graphics.

GUI refers to an interface that must be navigated through. For some tasks it is fine, for others it is just too time consuming.

Joel Garry said...


Yes, I am using the performance page right now to watch a long running archival-of-data test. It becomes very obvious when the 1/2 blue (i/o) and 1/2 green (cpu)stripes switch to mostly green after about an hour. I'm guessing this is Oracle deciding to switch to multiblock reads off an index, so spending more time on cpu. But... seriously... how can I know? And how can I make it switch earlier once I do know? (This is code generated through an OCI generator, so I can only poke at it externally. It is committing groups of 1000 rows, apparantly).

word: sconisa

John Kanagaraj said...

Hi Kyle, I agree with Jared. This is not to say that we should not use graphical tools. What I am trying to say is that *before* a DBA uses a GUI tool, he/she should understand what it means. I wish there was a way to have a challenge/response which says "Demonstrate to me (OEM) that you understand what this screen means before you enter!".. :)

I think it is inevitable that this move to GUIs will not only continue, but actually accelerate, and I need to be prepared to fix issues caused by "point-and-click" DBAs who haven't understood what they are doing. Job security, I say! :)

Oracle Training said...

Nice post ! This really helps me to find the answers to my question. Hoping that you will continue posting an article having a useful information. Thanks a lot ! this is useful article i like it.

Anonymous said...
This comment has been removed by a blog administrator.