Currently browsing Oracle

THE WORLD DISCUSSES #PYTHIAN ON TWITTER. HAVE A QUESTION? USE OUR HASHTAG AND ASK AWAY.

Log Buffer #183, a Carnival of the Vanities for DBAs

Hello folks, it’s great to be back from hiatus. This is the 183rd edition of Log Buffer (arguably the best edition of Log Buffer yet!), the weekly review of database blogs.

The last time I wrote this was just under 2 years ago!!! WoW. Things have changed. Sun bought MySQL, Oracle bought Sun. Those were bombshell deals. At least you can rest assured that some things can be constant. I still eat my daily serving of broccoli (among other healthful “things”). I urge you all to go the fridge and grab some veggies prior to sitting down for this week’s… ahem… digest.

Starting with Oracle, Pythian’s own Alex Fatkulin illustrates a bug (?…likely) that could lead to logically corrupted data. Doug Burns provides an update on his Hotsos 2010 trip with some serious thumbs-up action pointing in Tanel Poder’s direction and his affinity toward SQL*Plus.

Over at Mark Rittman’s Oracle Weblog, Venkatakrishnan J talks about Oracle Warehouse Builder 11gR2 – Importing Essbase Cubes using ODI Knowledge Modules – Part 1. This should drive the MySQL folks bonkers (in a good way) since he points to an example by David Allen to import MySQL Metadata over and vice versa.

Oracle Virtualization Blog’s Adam Hawley let everyone know about a Best Practices around Oracle VM with RAC RAC SIG webcast. It was on March 18th, but it was recorded and should be available online. I’m interested in this stuff so I included it here. I hope you can enjoy it too.

I had the honour to recently provide a training session at a customer site on tuning methods and tools. A key topic of the discussion was related to Oracle statistics and the CBO. It was timely that the Oracle Scratchpad’s Jonathan Lewis posted a series created by Doug Burns all about stats. Nice.

Has anyone ever told you (or maybe you deduced it on your own) that leaving out where clauses is a bad thing. Well, leave it to Charles Hooper on his Oracle Notes to prove to us that sometimes, they are actually more efficient for solving certain types of problems. In another excellent post titled Physical Reads are Very Fast, Why is this SQL Statement Slow Charles also dives into why a slow query is “actually” slow. There’s an interesting discussion taking place. More performance tuning goodness was posted by Joel Goodman discussing some interesting behaviour with Oracle Index Leaf Blocks contention. Tell RAC to Leave Your Leaves Alone! Kerry Osborne illustrates the use of an interesting hidden parameter (_high_priority_processes) to resolve “log file sync” issues.

Over on the other side of the fence in the MySQL world, Jay Pipes @ Join-Fu gives us some background on the MySQL Transaction Log. Vadim Tkachenko with the MySQL Performance Blog has a number of posts on Percona 9.1 as well as a list of related sessions at the 2010 MySQL conference. Check it out.

On a more somber note (and by somber I mean legal, we all hate legalese don’t we?), Giuseppe Maxia over at The Data Charmer discusses Protocol, the GPL, and how Bazaar can help. He also has some good takeaways from the Linux MySQL distros meeting in Brussels. Baron Schwartz at xaprb has a new tool he’d like the MySQL folks to take for a spin. Try mk-query-advisor, a new Maatkit tool. It uses heuristics to find problems in SQL. Please use it and give feedback!

Are you interested in MySQL Clustering? I am. Andew Morgan has a new post introducing a tutorial to Build MySQL Cluster 7.1 from source – including MySQL Cluster Connector for Java. With Alex Fatkulin maybe running into an as yet possibly, sort of , kinda non-discovered bug, it’s only fair we also get some vision into the dark side on the MySQL front. Shlomi Noach states But I DO want MySQL to say “ERROR”!.

Brian Aker invites readers to participate at this year’s O’Reilly MySQL User’s Conference where they will be doing their first ever Ignite talk series.

Lastly, Stewart Smith has a very good set of posts illustrating Stored Procedures/Functions for Drizzle. Check this out (from Stewart’s post).

drizzle> select libtcc("#include <string.h>\n#include <stdlib.h>\nint foo(char* s) { char *a= 0x199c610; strcpy(s, a); return strlen(s); }") as result;

+--------------+
| result       |
+--------------+
| Hello World! |
+--------------+
1 row in set (0.01 sec)

I dare you.

On to SQL Server….

Scary DBA SQL MVP Grant Fritchey discusses Undocumented Virtual Column: %%lockres% and also recaps the SNESSUG March Meeting.

Jamie Thomson gives keyboard junkies some tips to Kill your temp tables using keyboard shortcuts : SSMS. Anyone interested in distributed queries should read Buck Woody’s Using linked servers, OPENROWSET and OPENQUERY.

Finally, Aaron Bertrand says with conviction “Yes, you can benefit from both data and backup compression”.

Having now exhausted my supply of munchies, it is time for me to retire. I bid you all a fantastic week. Keep your data safe, folks.

Shakir

Deferrable constraints in Oracle 11gR2 may lead to logically corrupted data

I’ve hit a bug in Oracle 11.2.0.1 when working with deferrable constraints which I think is worth sharing as it may have profound consequences under certain scenarios.

Let’s start by creating a simple table with a deferrable primary key:

SQL> create table def_bug(n number primary key deferrable initially deferred);

Table created

SQL> insert into def_bug values (1);

1 row inserted

SQL> insert into def_bug values (2);

1 row inserted

SQL> commit;

Commit complete

You can confirm that the primary key constraint is working fine by trying to insert a duplicate value:

SQL> insert into def_bug values (1);

1 row inserted

SQL> commit;

commit

ORA-02091: transaction rolled back
ORA-00001: unique constraint (SRC.SYS_C004070) violated

So far so good. Open a second session and execute the following update:

SQL> update def_bug set n=3 where n=2;

1 row updated

Do not commit yet and execute in your first session:

SQL> update def_bug set n=3 where n<=2;

The above update will block due to our second session holding a lock on the row where n=2. Now commit your second session…

SQL> update def_bug set n=3 where n=2;

1 row updated

SQL> commit;

Commit complete

…and then commit your first session:

SQL> update def_bug set n=3 where n<=2;

1 row updated

SQL> commit;

Commit complete

Take a look at the data now:

SQL> select * from def_bug;

         N
----------
         3
         3

Ouch! This was certainly unexpected. You can confirm that the primary key is still working by trying to insert a duplicate value again:

SQL> insert into def_bug values (3);

1 row inserted

SQL> commit;

commit

ORA-02091: transaction rolled back
ORA-00001: unique constraint (SRC.SYS_C004070) violated

It certainly looks like the update statement did not take into account deferrable constraint declared on the table during restart caused by the write consistency mechanism.

Log Buffer #182, a Carnival of the Vanities for DBAs

This is the 182nd edition of Log Buffer, the weekly review of database blogs. Make sure to read the whole edition so you do not miss where to submit your SQL limerick!

This week started out with me posting about International Women’s Day, and has me personally attending Confoo (Montreal) which is an excellent conference I hope to return to next year. I learned a lot from confoo, especially the blending nosql and sql session I attended.

This week was also the Hotsos Symposium. Doug’s Oracle Blog has a series of posts about Hotsos. If all this talk about conferences has gotten you excited, Joshua Drake notes that 14 days and the hotel is almost full for postgresql conference east which is March 25th-28th in Philadelphia. And the Oracle database insider notes that the Oracle OpenWorld call for papers is now open.

According to Susan Visser this week (ending tomorrow) is also read an e-book week. So if you have not already done so, read an e-book! She links a coupon for an e-book in the post.
Read the rest of this entry . . .

Hotsos Symposium 2010 — Battle Against Any Guess Is Won

Video fragments of my session posted at the end — read on.

I arrived at Omni Mandalay Hotel on Sunday evening with Dan Norris. I was flying through Chicago and it turned out that Dan was on the same flight and only few rows behind me. Small world.

Preparations for the conference were very chaotic on my part and, of course, I didn’t have either of my presentations ready. I was very stressed and getting sick as well — it looked like a complete disaster waiting to happen. I’d like to say that I was feeling like Doug Burns as he often managed to get sick just before a conference. Of course, I worked on my slides for the last few days as well as on the flight and presentation was slowly getting there but boy was I tired!

I quickly said hello to the crowd in the bar on the way to my room and rushed away to do some more damage to my slides. And then I had a brilliant idea — I could still see one of my best mates and do something good about my presentation! I asked Doug if he was interested in the preview (he probably wasn’t interested but he couldn’t say it to me) especially that my session wasn’t on his original agenda. Of course, that would mean that he had to leave a bunch of other good friends and spend some time tete-a-tete. Knowing Doug, this is some of the hardest thing to ask from him but it shows how good of a friend he is! (Plus, everyone thinks that he is anti-social anyway. Shhhh!)
Read the rest of this entry . . .

International Women’s Day

If you do not know what International Women’s Day is: http://www.internationalwomensday.com/

Start planning your blog posts for Ada Lovelace day now (March 24th, http://findingada.com/ Ada Lovelace Day is an international day of blogging (videologging, podcasting, comic drawing etc.!) to draw attention to the achievements of women in technology and science.)

To that end, I would like to point out all the women currently in science and tech fields that I admire and think are doing great things. I think it would be great if everyone, male or female, made a list like this:
Read the rest of this entry . . .

Oracle 11gR2 Grid Infrastructure — Memory Footprint

DIMMsUpgrading to 11g Release Grid Infrastructure? You probably want to read on…

Oracle 11g Release 2 Grid Infrastructure has been dramatically redesigned compare to 10g and 11gR1 Clusterware. Coming with impressive set of new features, Grid Infrastructure also uses much more memory. While RAM is rather inexpensive these days, it does pose an inconvenience in some scenarios. Particularly, for sand-box type installations that I use all the time for my own tests and demonstrations. For production upgrades, you need to be aware of and plan for increased memory usage.

I’ve been able to easily run a 2 node 10g RAC cluster on my MacBook with 4 GB of RAM allocating less than 1 GB of RAM to each virtual machine. That was even enough for a mini database instance with a very small memory footprint. Oracle 11g Release 1 was pretty much the same except maybe the database instance itself required a bit more memory but one node could still fit within 1 GB of RAM.

In 11gR2, bare-bone Grid Infrastructure processes alone consume 10+ times more memory (11.2.0.1 on 32 bit Linux to be precise): Read the rest of this entry . . .

Log Buffer #181: a Carnival of the Vanities for DBAs

The 181st edition of Log Buffer has been published by Gary Myers on his Sydney Oracle Lab.

Having recently moved his blog, Gary approached the Log Buffer coordinator to volunteer for an edition because he knows that, with LB being a popular and established destination in the database blogoshphere, it would help him broadcast his new blog and welcome readers to it. You can do it too–simply send an email to the Log Buffer coordinator.

Here’s Gary’s Log Buffer #181.

Live RAC SIG Web-cast Today: Oracle ASM 11g — The Evolution

Just a quick announcements…

If you didn’t manage to attend my presentation, Oracle 11g ASM — The Evolution, during RMOUG or other conferences, you have a chance to see it online today. I’m doing it a web-cast at RAC SIG. It’s today, 4-Mar-10 at 12:00pm EST (9:00am PST).

RAC+ASM 3 years in production. Stories to share (slides from RMOUG10)

Here are the slides from my presentation at RMOUG 2010.

I am not sure how much sense all this will make without my comments. We may do it in a webinar if there is sufficient interest. Regardless I will probably be doing it again at some point in the future.

Log Buffer #180: a Carnival of the Vanities for DBAs

Hello and welcome to Log Buffer #180. Time’s a-wastin’, so let’s go!

Oracle

There was so much Oracle stuff this week that I’ve decided to cram a little more of it into Log Buffer by providing a little less context than usual.

Jonathan Lewis shares an explication of aliases: “I was asked the following question recently: ‘Does the use of table aliases affect performance?’ To which the best answer is probably ‘Yes, though in general you probably won’t notice the difference and there are reasons more imporant [sic] than performance for using table aliases.’”

Doug Burns continues his most recent series: Statistics on Partitioned Tables – Part 2, and Statistics on Partitioned Tables – Part 3.

Charles Schultz demonstrates how VPD + bad ANYDATA practices can really bite: “The point of my blog was that using CAST can really screw up your data. Oracle Support is filing a bug on this behavior, as it looks like an overflow problem.”

Pythian’s Gleb Otochkin begins a series on Oracle GoldenGate installation.

Guy Harrison provides a thorough introduction and recommendations on memory management for Oracle databases on VMWare ESX.

Robert Vollman returns to blogging and offers his 10-point plan on improving your SQL queries.

Jared Still sheds some light on a cool but unknown RMAN feature. Read the rest of this entry . . .

Start NowWith Pythian - database design, management and emergency handling capabilities...

Live Updates

pythian: RT @sheeri: #confoo talk "Bending Queries to your Will with EXPLAIN" slides http://bit.ly/explainslides & handout
more



Testimonials

  • Serge Racine

    DBA, Brookfield Energy

    We are very satisfied by the service given to us by Andre and Shakir in support of our recent data quality and reorganization initiative.... more