Oracle Apps Technology

Blog dedicated to Oracle Applications (E-Business Suite) Technology; covers Apps Architecture, Administration and third party bolt-ons to Apps

Monday, July 6, 2009

Everything over IP

I am currently reading the book "The Illustrated Network, How TCP IP works in a modern network" by Walter Goralski. Here's a passage from the foreword which I found interesting:

Things move fast in the networking industry; technologies can go from cutting edge to obsolete in a decade or less (think ATM, frame relay, token ring, and FDDI among others). It is therefore amazing that TCP/IP is 35 years old and evolved from ideas originating in the early 1960s. Yet while the protocol invented by Vint Cerf and Bob Kahn in 1973 has undergone—and continues to undergo—hundreds of enhancements and one version upgrade, its core functions are essentially the same as they were in the mid 1980s. TCP/IP’s antiquity, in an industry that unceremoniously discards technologies when something better comes along, is a testament to the protocol’s elegance and flexibility.

And there is no sign that IP is coming to the end of its useful life. To the contrary, so many new IP-capable applications, devices, and services are being added to networks every day that a newer version, IPv6, has become necessary to provide sufficient IP addresses into the foreseeable future. As this foreword is written, IPv6 is in the very early stages of deployment; readers will still be learning from this book when IPv6 is the only version most people know.

The story of how TCP/IP came to dominate the networking industry is well known. Cerf, Kahn, Jon Postel, and many others who contributed to the early development of TCP/IP did so as a part of their involvement in creating ARPANET, the predecessor of the modern Internet. The protocol stack became further embedded in the infant industry when it was integrated into Unix, making it popular with developers.

But its acceptance was far from assured in those early years. Organizations such as national governments and telcos were uncomfortable with the informal “give it a try and see what works” process of the Working Groups—primarily made up of enthusiastic graduate students—that eventually became the Internet Engineering Task Force (IETF). Those cautious organizations wanted a networking protocol developed under a rigorous standardization process. The International Organization for Standardization (ISO) was tapped to develop a “mature” networking protocol suite, which was eventually to become the Open Systems Interconnection (OSI).

The ISO’s modus operandi of establishing dense, thorough standards and releasing them only in complete, production-ready form took time. Even strong OSI advocates began using TCP/IP as a temporary but working solution while waiting for the ISO standards committees to fi nish their work. By the time OSI was ready, TCP/IP was so widely deployed, proven, and understood that few network operators could justify undertaking a migration to something different.

OSI survives today mainly in a few artifacts such as IS–IS and the ubiquitous OSI reference model. TCP/IP, in the meantime, is becoming an almost universal communications transport protocol.

- Jeff Doyle

Monday, June 29, 2009

RMAN works best with RBO

Eventhough Oracle forced everyone to move to Cost Based Optimizer (CBO), their own tools continue to use RBO. RMAN is a classic example. Refer to Metalink Note 375386.1 which describes performance problems selecting from V$RMAN_STATUS. The cause is given as bug 5247609 and workaround provided is:

Add the following to your rman script:

sql "alter session set optimizer_mode=RULE";

A few customers have found that using RULE does not workaround this but gathering fixed statistics does:

SQL> exec dbms_stats.gather_fixed_objects_stats()

Thursday, June 25, 2009

Hotsos PRO training Day 3/3

Today we learnt how to read raw trace files and manually calculate what HotSoS profiler does programmatically.

Metalink Note 39817.1 explains the same. In Oracle 10g we have a new package DBMS_MONITOR through which trace should be done.

We learnt to analyze trace files and did various exercises with profiler reports.

Ric said, he has stopped working with tkprof ever since he got introduced to HotSos profiler and that if he ever were to go independent, he would sell his soul for keeping the HotSos profiler in his bag of tools.

HotSoS profiler is the best. I have compared the outputs of other profilers like Oracle's trace analyzer and OraSRP. However none of the alternatives provides the depth of HotSoS profiler.

Hotsos PRO training Day 2/3

Today we learnt how to collect trace data with proper instrumentation, Hotsos free package ILO for implementing instrumentation in PL/SQL code was shown. We learnt how to read trace files.

One of the students, Rob had brought a production trace file. Our instructor, Ric, generated the profiler report for that trace file. There were 3 statements:

1. UPDATE 30% time
2. INSERT 25% time
3. UPDATE 27% time

Ric said that the first statement looked optimized as it was doing 1 LIO per execution which is very good. However, it was doing this thousands of time. In HotSos World, the best way to optimize something is not to do it. Rob explained that they were updating all the rows with very same data everytime. Ric told Rob to explore MERGE command which will combine INSERT and UPDATE and avoid the unnecessary UPDATE of very same data again.

Tuesday, June 23, 2009

Hotsos PRO training Day 1/3

I am attending the world famous 3 day training on Oracle Performance from Hotsos. Our instructor is Ric Van Dyke. We have 6 students in the class. Ric mentioned that he was our instructor and not a teacher as an instructor presents the information, but a teacher makes sure that the student learns whatever is taught. 3 days is a short period to teach.

7 years back when I was in New Delhi, India, I had read Cary Milsap's book Optimizing Oracle Performance from cover to cover. It had enlightened me about Oracle performance.

Here are some of the things we learnt today apart from the regular curriculum:

1. For each row returned you should touch 10 or fewer blocks
2. No. of Logical IOs = No. of tables in a query x No. of rows x 10
3. Nested loops work great with small data sets.

Thursday, June 18, 2009

Oracle's v$ views

Vinu asked me whether we can insert a new directory for utl_file_dir into v$parameter. I explained to him that v$views are not tables and are synonyms of v_$ dynamic performance views. These views are available even before database is in OPEN state. Although these views appear to be regular database tables, they are not. These views provide data on internal disk structures and memory structures. These views can be selected from, but never updated or altered by the user.

The file $ORACLE_HOME/rdbms/admin/catalog.sql contains definitions of the views and public synonyms for the dynamic performance views.

Once the instance is started, the V_$ views that read from memory are accessible. Views that read data from disk require that the database be mounted.

You can find the description of the v$ synonyms here.