Search

OakieTags

Who's online

There are currently 0 users and 21 guests online.

Recent comments

Oakies Blog Aggregator

OpenWorld 2012 Call for papers...

The call for papers for Oracle OpenWorld is now open.  Give it a try and see if you can get a slot!

Oracle ACE Directors + 1 — Gwen Shapira

Quick post congratulating Gwen Shapira on becoming Oracle ACE Director. Gwen has be an Oracle ACE for a while by now and been very active in the community. Widely recognized in the conferencing circles and a frequent blogger, Gwen has recently been focusing a lot on Big Data and many of her recent articles have [...]

What's important

In reviewing my blog activity over the past few years, I noticed that the first two years I had the blog I averaged about one post per week. The next year, my posts fell off to about one per month. Then last year, I only had 3 posts! Talk about decline!

I want to revitalize my blog and post 1-2 times per month. Given my blogging history, I realize this is a big change to commit to. I think part of me being successful is going to hinge on understanding where making time to blog more regularly fits into my life. My lack of posts hasn't been due to a lack of material or ideas...I have tons of those. My passion for work and interest in continuing to learn and grow professionally is as strong as ever. But I've found that almost everything has taken a back seat to spending time with my family. #111111;">I get frustrated at times because I do want to blog and work more, but I don't want to be away from my family and I'm jealous of every minute of my time. One thing my daughter has taught me is that every moment, no matter how simple or ordinary it is, can be filled with wonder and joy. And, I really want to appreciate these moments fully. Now.
#111111;">

#111111;">

#111111;">

#111111;">So, I'm going to work towards spending a few moments each day to compose some ideas and put them into posts that show up more frequently here. To each of you who read this blog, thank you. I'll do my best to provide useful information (along with some personal thoughts, rants and fun) so that the moments you graciously take to stop by and read are well spent.

University of Birmingham CS Alumni Dinner (update)…

A couple of weeks ago I wrote about my invite to the University of Birmingham CS Alumni Dinner, which took place last night…

It was really weird being back on the campus after all these years. I finished my PhD about 18 years ago (or something like that) I popped in to my department (Biosciences) a couple of times soon after I left and I used to train at the University gym for a little while, but it must be over a decade since I’ve been back. I don’t know about the rest of the campus, the part where I spent most of my time as changed a lot. Very freaky. :)

I wasn’t really sure what to expect from the evening, especially since I wasn’t a Computer Science graduate, but it turned out to be really good fun. I think I gave a number of people a repetitive strain injury (RSI) of the ears with my constant gabbing. I hope they found it worthwhile. I know I did. It’s interesting speaking to the next generation of computer geeks and trying to get a handle on what they think about the industry.

With a bit of luck I will get to do it all again next year. Hope so.

Cheers

Tim…




VirtualBox 4.1.10 Released…

I, for one, welcome our new VirtualBox 4.1.10 overlords…

See changelog

Happy upgrading.

Cheers

Tim….




John Carter…

It’s been a while since I’ve been to the cinema. I’ve been checking the listings regularly, but nothing has caught my interest. Yesterday I saw an advert on some website for John Carter which caught my eye. The name of the film sucks, which is probably why I never noticed it before, but after seeing the trailer I though it was worth a shot.

I really enjoyed it. The story is pretty neat, provided you don’t try to analyze it for more than a second. The visual effects are fantastic. There is a cute dog/lizard/monster thing that I really want. The leading lady is hot. Most importantly, it doesn’t take itself too seriously.

I went to see the 2D version, but Noons said the 3D version was good too.

If you like Sci-Fi movies I think you will like it.

Cheers

Tim…




Thoughts on a Hyper-Extended Oracle Performance Monitor Beta

March 12, 2012 As long time readers of this blog might know, in my free time during roughly the last 10 years I have been working on a program named “Hyper-Extended Oracle Performance Monitor”.  Since 2005 or 2006 I have permitted a few people to try the beta versions of the program, thinking that I might [...]

Half Price

Another book offer from Apress.

I can’t find any online confirmation at present, but until the end of this week (19th March) it seems that promotion code SXSW12 will get you all the Apress eBooks you want with a 50% discount according to this posting on the Oracle-L list server: http://www.freelists.org/post/oracle-l/SemiOT-Halfoff-Apress-ebooks

Windows 8 Rant Continued…

One of the comments on my  rant about Windows 8 suggested this might be a good thing for desktop Linux. I just don’t see it myself. The only people I know who run desktop Linux are techies or immediate family members of techies. I don’t see this changing any time soon. Why? The same reasons that have been used for years…

  1. Windows gets bundled with new PCs. People will have it and use it, regardless of their preferences.
  2. Companies support windows with drivers and software. The number of companies that truly support Linux on the desktop is limited in comparison. Chances are you are reading this on a desktop using a graphics card that currently doesn’t have an open source driver directly from the manufacturer. The recent news about NVIDIA may change this.
  3. The PC games industry is based around Windows. Yes, there are Mac and Linux titles, but for the most part, it’s a Windows world.
  4. Some of the “industry standard” apps people use (Microsoft Office) do not come on Linux. Yes, you can run them on WINE or use an open source alternative, but the fact is you can’t just put in a MS Office disc and install it on Linux.
  5. Following on from point 4, the education system focuses heavily on the MS world. My sister-in-law is currently doing an evening school computer course, which is totally based around Windows and Office. The course in question is pretty much mandatory for any people looking for a job on the public sector these days.

I know there are counter arguments to all these points (many involving The Cloud no doubt) and in making them you will be preaching to the converted. I’m writing this on a PC running Fedora 16. :) The point is, as much as I hate Windows 8 and it’s bipolar interface, I don’t see it having any affect on the desktop landscape.

The biggest threat to Microsoft in recent years has been iOS and Android on mobile devices. MS has failed in the phone and tablet market. If Windows 8 starts getting a reasonable market share on mobile devices, Microsoft may reign supreme again. If not, they will be consigned to the desktop, which is not a terrible fate. People keep predicting the death of the desktop and laptop, but I don’t know anyone who has completely binned their desktop/laptop in favor of a fondle-slab or phone… Yet… :)

So we are left in this depressing position where Windows 8 sucks and we are all going to use it (directly or indirectly). My alter-ego, Captain Support, will be called upon to rescue friends and family using Windows 8, so I’m going to have to use it, even though I don’t use Windows myself.

Cheers

Tim…

Update: Just read this. Seems I’m just afraid of change. :) Funny. I didn’t feel afraid of change when I moved from GNOME2 to GNOME3. In fact, I seem to remember writing that I liked the change. I think people are afraid of changing to something crap. :)




Analysing Row Lock Contention with LogMiner

Recently I had to analyse a row lock contention problem that can be illustrated by the following test case:

  • A session (let’s call it #1) creates a table and inserts a row into it (note that “n” is the primary key of the table):
SQL> CREATE TABLE t (n NUMBER PRIMARY KEY);

SQL> VARIABLE n NUMBER

SQL> execute :n := 1

SQL> INSERT INTO t VALUES (:n);
  • Another session (let’s call it #2) inserts the same data into the same table:
SQL> VARIABLE n NUMBER

SQL> execute :n := 1

SQL> INSERT INTO t VALUES (:n);
  • Since session #1 did not commit and that session #2 inserted a row with the same primary key, session #2 is blocked waiting for session #1 to either commit or rollback:
SQL> SELECT sid, blocking_session, event, sql_text
  2  FROM v$session LEFT OUTER JOIN v$sqlarea USING (sql_id)
  3  WHERE nvl(blocking_session,sid) IN (SELECT holding_session FROM dba_blockers);

       SID BLOCKING_SESSION EVENT                          SQL_TEXT
---------- ---------------- ------------------------------ ------------------------------
       130                  SQL*Net message from client
       197              130 enq: TX - row lock contention  INSERT INTO t VALUES (:n)

It goes without saying that in such a case the problem is the application that tried to insert two rows with the same primary key. In the real case the primary key was a natural key, not a surrogate key generated through a sequence. To help the developers troubleshoot the problem it was therefore necessary to know the actual value of the bind variable used for the two inserts. Unfortunately this information is stored in the PGA of the server processes and, therefore, it is not directly accessible. In addition I started investigating the problem only a couple of hours after the contention began and, therefore, also a view like V$SQL_BIND_CAPTURE is of no use.

As a result I decided to mine the archived redo logs to find the information I was looking for. Here is what I did:

  • Find out the XID of the transaction holding the row lock:
SQL> SELECT t.xidusn, t.xidslot, t.xidsqn, t.start_time, t.start_scn
  2  FROM v$transaction t JOIN v$session s ON t.addr = s.taddr
  3  WHERE s.sid = 130;

    XIDUSN    XIDSLOT     XIDSQN START_TIME            START_SCN
---------- ---------- ---------- -------------------- ----------
         7         12       1049 03/09/12 07:10:25       1462388
  • Find out which archived redo log contains the first redo records of that transaction:
SQL> SELECT name
  2  FROM v$archived_log
  3  WHERE 1462388 BETWEEN first_change# AND next_change# - 1;

NAME
-----------------------------------------------------------------------------------------------
/u00/app/oracle/fast_recovery_area/DBA112/archivelog/2012_03_09/o1_mf_1_94_7om7qzdx_.arc
  • Start LogMiner:
SQL> EXECUTE dbms_logmnr.add_logfile(logfilename=>'/u00/app/oracle/fast_recovery_area/DBA112/archivelog/2012_03_09/o1_mf_1_94_7om7qzdx_.arc')

SQL> EXECUTE dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog)
  • Extract the redo information of the operations performed by the transaction holding the row lock and, therefore, finding that the value of the bind variable was “1”:
SQL> SELECT sql_redo
  2  FROM v$logmnr_contents
  3  WHERE xidusn = 7
  4  AND xidslt = 12
  5  AND xidsqn = 1049;

SQL_REDO
--------------------------------------------------------------------------------
set transaction read write;
insert into "CHRIS"."T"("N") values ('1');
  • Stop LogMiner
SQL> EXECUTE dbms_logmnr.end_logmnr

In conclusion, even though mining (archived) redo logs for extracting the value of bind variables is probably not the most typical use of LogMiner, it works well. Therefore, do not forget this possibility if you have to do it.