Sunday, 20 March 2011

How to generate test data

Few months ago I wrote a question on oracle-l regarding generation of test data. Stephane Faroult answered me suggesting to take a look to the fourth chaper of his own book Refactoring SQL Applications.
Having test data is really important because many times you cannot work with masked data or you do not have any data at all.
In my case I had to generate a table, huge table, of employees or citizens. The solution was to find and download lists of firstnames and surnames with rank and distribution; also I needed a list of top1000 cities in the United States. Google is always an interesting source, but the best site is, for US of course, the Census Bureau website.
Stephane Faroult suggested a method to calculate the frequency based on rank and then to create a table with correct percentage of names. The book contains a set of scripts can be used and adapted for any needs.

Tuesday, 15 March 2011

Will SNMP Subagent be dismissed by Oracle?

Today I've been looking how to load some performance metrics from Oracle database to Cacti. Cacti has an interesting collection of monitoring scripts available for Oracle uses Oracle SNMP agent. The SNMP subagent is part of Oracle Enterprise Manager agent acts as a proxy between SNMP and database queries. This kind of feature, according to metalink (formerly My Oracle Support, aka MOS) will be deprecated in future releases starting from enterprise manager 11gR2.
ANNOUNCEMENT: The Management Agent's SNMP SubAgent is Being Planned for Deprecation in Future Release of Grid Control [ID 1057526.1]

This is really bad and probably Oracle already knows that many monitoring systems and infrastructures are based on this component. To prove this, at the end of announcement, Oracle is seeking feedback through Oracle communities website where many people has already expressed their disappointment about this news.

In fact what about your third parties monitoring system? I like Enterprise Manager for many feature but I also hate it for many others. Capability of creating and maintaining graphs is really poor, CACTI, that's based on RRD, does it better for example. Also the real monitoring system seems good but if you drill down al features you can understand that is not so good, and sometimes its cost is not justified by its own features.

Sunday, 13 March 2011

Oracle Trivadis Performance Days 2011

Just to let you know that I'll in Zurich for Trivadis Performance Days 2011. Hope it'll be a day to meet other oracle professionals. If you plan to come in Zurich let me know so we can organize a dinner and/or a beer togheter!

Tuesday, 8 March 2011

Oracle Transaction Isolation Level

This concept is almost unknown by people. Googling for Oracle Transaction Isolation Level the first post is a PowerPoint file from the University of Indiana about Oracle Locking mechanisms that is not strictly related and sometime confused with transaction isolation level.
Transaction Isolation Level is a property of ACID model called Isolation and is described here on wikipedia.
Oracle talks about its own isolation level in the Concepts Book, chapter 13. Probably with Oracle you've never heard anything about this because:

  • You've not read carefully the Concepts book

  • You don't know all about ACID model

  • You don't know anything that is not Oracle and it's normal workig way

  • Most developers don't use Isolation Level (probably because they don't know it)


It's important to understand that oracle use the read consistency isolation level and in particular Oracle use if at statement level. Thus you are sure that data for every query comes from a single point. This does not eliminate the possibilty to change isolation level for a particular transaction.

Locking mechanism is important but is not strictly related to isolation level. Locking mechanism prevent destructive interaction between transactions accessing the same resource. Particular attention have to be used when you force isolation level to serialize because the way of locking and possibile locks