Preparing applications for migration to Oracle 11G from Oracle 10G

This post will guide you through few hidden facts involved in doing migration from Oracle 10G to Oracle-11.2.0.4. Oracle has made significant changes related to performance improvement in 11G release.However, there is no change from perspective of SQL constructs i.e. the effect of SQL queries is same on Oracle 11G.

The best way to know about new changes in any Oracle release is to follow its "Companion document". For Oracle 11G migration, the companion document can be found here.

So at a high level, steps for preparing your applications ready for migration are -
  1. Read the Companion document and know what new changes are there in the release.
  2. If you find any change that could probably impacts the application (i.e. either SQL construct
    change or a performance change) in Step-1 above, then identify if you can take any of following measures - 
    • Do nothing ( Sometimes, even if there is a change in release it doesn't impacts the application behavior. This can be confirmed by performing regression testing of application)
    • Change any database configuration parameters (Generally, when any existing feature is modified, backward compatibility is maintained. Find out if there is any configuration that will bring previous behavior back)
    • Change the source code

      (follow the sequence above and your life will be easier :-) )
However, the fact of the matter is that something gets missed from 2 eyes. And the companion document has missed, this (a) and this (b).

Why (a) and (b) is missing from document :
TOM Says, If you want the query results to appear in specific order, always use Order by clause.

Developers overlook the "always" word, and deliver the projects. Why so ? Because, when developers unit tested their code, they did not find any issue with ordering. The code (Ex. JDBC for Java) returns the record in expected order when unit tested. However, remember that Oracle has already warned. So, in Oracle version 10.2, the ordering started getting impacted by various factors (Ex. database load, query plan, data size) which are non reproducible while we do unit test and hence we see the behavior as expected. The result is, production outage.

The point here is, Oracle did not put this in Upgrade companion as Oracle had already warned.

So, now we have one more step to perform to make our applications ready for Oracle 11G migration -
      3. Identify in Source code the code pieces which relies on Ordering of the results having their underlying queries to not have an Explicit Order by clause.

If you don't follow step 3 above, you have a high risk of getting a production issue after you migrate to Oracle 11G. Period.

Hope you found this article useful. Have a happy migration ....

Comments

Popular posts from this blog

Why do I get Error: could not open `C:\Program Files\Java\jre7\lib\i386\jvm.cfg

Getting started with Weblogic Maven Plugin