Tuesday, 12 June 2012

Oracle Community: Partner News & Book Beat [Oracle Magazine July/August 2012 issue]

After ACE newsletter, the book makes into Oracle Magazine Book Beat section...great feeling and satisfaction that it reaches its readers...

Community: Partner News & Book Beat.

Saturday, 2 June 2012

Win a Free Copy of Packt's Oracle book

Gladly I would like to announce that Packt publishing has arranged a GiveAway contest for “Oracle Advanced PL/SQL Developer Professional Guide” especially and exclusively for the readers.

It’s easy to participate and walk away with your copy. All you need to do is just comment below the post and win a free copy of Oracle Advanced PL/SQL Developer Professional Guide  . Three lucky winners stand a chance to win an e-copy of the book. Keep reading to find out how you can be one of the Lucky One.



Overview of Oracle Advanced PL/SQL Developer Professional Guide
  • Blitz the 1Z0-146 exam

  • The Oracle Advanced PL/SQL Developer Professional Guide helps you to master the advanced PL/SQL concepts in Oracle 11g. The book is recommended for the Associate level Oracle professionals aspiring for Professional level. The topics covered and demonstrated are in line with the Oracle University prescription for Oracle Professional certification, which justify the version updates to be advanced and not complex.

  • Master the advanced features of PL/SQL to design and optimize code using real-time demonstrations

  • The book aims to cover the advanced features of PL/SQL which are required to design and optimize the PL/SQL code. The recapitulation of PL/SQL programming and advanced features like collections, external procedures, server side result caching, implementing VPD to enforce row level security, handling large objects and SecureFiles build up a concrete platform for a PL/SQL professional. Apart from the programming, the book makes instrumental recommendations on the usage of development tool SQL Developer, employing best practices in database environments and safeguarding the vulnerable areas in PL/SQL code to avoid code injection.

    Read more about this book and download free Sample Chapter: http://www.packtpub.com/oracle-advanced-pl-sql-developer-professional-guide/book

    How to Enter?
    All you need to do is head on over to this page and look through the product description of the book and drop a line via the comments to this blog post below to let us know what interests you the most about these books. It’s that simple

    Deadline
    The contest is open for a limited period and will close on 3rd July, 2012. Winners will be contacted by email, so ensure that you give real and correct email address when you comment!


    Enjoy reading, bye
    Saurabh

    Thursday, 17 May 2012

    An article suggestion from PacktPub.com

    Dear All All

    Packt publishers have extracted a chapter of my book as an article.





    PL/SQL: Using Collections

    The Oracle Advanced PL/SQL Developer Professional Guide helps you master advanced PL/SQL concepts. Besides the clear and precise explanation on advanced topics, it also contains example code and demonstrations, which gives a sense of application and usage to readers

    In this article by Saurabh Gupta, author of Oracle Advanced PL/SQL Developer Professional Guide, we'll cover the following topics:


    • Collections—an overview

    • Associative arrays

    • Nested tables

    • Varray

    • PL/SQL collection methods





    Click here to view the full article.

    Monday, 7 May 2012

    PL/SQL # Tip: Locally declared subprograms in PL/SQL

    Hi all,

    From long time, I am planning to start a blog section on PL/SQL programming tips. I have observed that as we grow more in technology, we skip some of the key features of language. When discovered later, the same tip appears to be an important bottleneck in programming.

    Here, we go with the first one!!

    We all know about the usage of local subprograms in anonymous blocks or subprograms. We declare local subprograms for private usage within the current block. They accomplish some small utility of the block and support modular programming. Few facts associated with the local subprograms are as below

    1. Local subprograms must be defined as the last construct in the declarative section. However, their prototype can be declared along with other constructs and identifiers in the declarative section. The concept is known as Forward Declaration.

    2. Results of locally declared functions in an anonymous blocks cannot be cached under 'Oracle 11g Result Caching' Scheme.

    3. Locally declared subprograms cannot be used within SQL statements which appear in the current block. Let us conduct a small case study

    create table t_demo_sql
    (a number,
    b number)
    /

    Table created.

    create or replace procedure p_ins_rec (p_data number)
    is
    function f_getnum(p_num NUMBER) return number
    is
    begin
    return (p_num*2);
    end;
    begin
    insert into t_demo_sql values
    (p_num, f_getnum(p_num));
    end;
    /

    Warning: Procedure created with compilation errors.

    SELECT NAME, ATTRIBUTE, TEXT FROM USER_ERRORS WHERE NAME='P_INS_REC'
    /

    NAME ATTRIBUTE TEXT
    ---------- --------- -----------------------------------------------------
    P_INS_REC ERROR PLS-00231: function 'F_GETNUM' may not be used in SQL
    P_INS_REC ERROR PL/SQL: ORA-00904: : invalid identifier
    P_INS_REC ERROR PL/SQL: SQL Statement ignored


    Instead, the results of local subprograms must be captured in local block variables. Thereafter, these block variables can be used within the SQL statements.

    Above features of local subprograms appears to be small but are very useful in day to day programming. Hope you all will like it!!

    Do share your suggestions, additional observations or feedback, which of course value a lot to me.

    Monday, 2 April 2012

    An Exclusive Thank You from Packt Publishing -- Any 3 Packt Ebooks for just $19.99

    Good Morning and Happy April month to all,

    Here is a great offer from Packt publishers for the week. Don't wait !! Hurry

    This week only and to thank you for your custom in the past we have two exclusive offers for you:


    1. Buy three Packt ebooks for just $19.99.

    2. Buy one book, you can get any Packt ebook for just $9.99.



    On a purchase of 3 ebooks, this offer will save you up to $80 off the list price.

    To take advantage of these offers, browse our book store to find the ebooks you want, add your ebook choices to your cart, and use the following discount codes at the checkout:


    1. Buy three ebooks for $19.99: [Promo Code: THOR20]

    2. Buy one ebook for $9.99: [Promo Code: DANYEB]



    This offer runs for 1 week only, so be quick and get your cut price ebooks before next Thursday, 5th April 2012.

    Packt Publishing Direct Marketing Team

    Use the link for pre order:
    http://www.packtpub.com/oracle-advanced-pl-sql-developer-professional-guide/book

    Bye for now,
    Saurabh

    Tuesday, 6 March 2012

    Enjoy reading...enjoy PacktLib

    Packt

    Hi,

    Nice to see a new development for Indian techies from Packt publishers. The publishers library PacktLib is now free for tech readers in India. Interested readers can create their account and use the library for free from 8 to 8.



    Find more information at http://packtlib.packtpub.com/......Enjoy

    Bye, Saurabh

    Saturday, 25 February 2012

    Methodical Performance Tuning Part 2 by Arup Nanda: AIOUG webcast

    Arup Nanda delivers yet again a useful webcast on Oracle performance tuning practices. This time he shows the utilization of V$ views to analyse the session level waits and statistics.

    Download links are as below

    http://arup.blogspot.in/2011/10/aioug-webcast-methodical-performance.html

    http://arup.blogspot.in/2012/02/aioug-webcastmethodical-performance.html

    Besides, the reviewing activities on "Book in Making" are going smooth. My regards to Ronald Rood, Kamran Agayev and Mohan Dutta, who are investing their efforts and valuable time in reviewing the book. Thanks for all  your responses on the book listing.

    Saurabh

     

    Sunday, 19 February 2012

    Upgrading to Oracle 11gR2, presented by Syed Jaffar Hussain

    Oracle ACE Director Syed Jaffer Hussain presents a webinar on upgrading database systems to Oracle 11gR2.

    http://www.youtube.com/watch?v=QcH7Z3w2AbM

    Have a learning and enjoyable experience

    Thanks

    Saurabh

     

    Wednesday, 1 February 2012

    Discovering the Author within me: My upcoming book

    Happily I would announce the listing of my upcoming book at PacktPub publishers website. The book is expected to be released by May, 2012.

    The book is for the Oracle Associate professionals who are aspiring for Professional level exam (1Z0-146 certification).

    "The Oracle Advanced PL/SQL Developer Professional Guide helps you master advanced PL/SQL concepts. Besides the clear and precise explanation on advanced topics, it also contains example code and demonstrations, which gives a sense of application and usage to readers. The book gives a deep insight that will help transform readers from mid-level programmers to professional database developers. It aims to cover the advanced features of PL/SQL for designing and optimizing PL/SQL code."--From PacktPub webpage

    http://www.packtpub.com/oracle-advanced-pl-sql-developer-professional-guide/book

    Wait until May but surely book your copies in advance.

    Thanks to Oracle and Luv u All,

    Saurabh

    Saturday, 28 January 2012

    A Conversation with Hans Forbrich

    Hans Forbrich, an Oracle ACE Director, talks about his path to becoming a prized speaker at Oracle User Group meetings around the world.

    http://medianetwork.oracle.com/video/player/961894745001

    Enjoy all

    Saurabh

    Tuesday, 17 January 2012

    Revise Partitioning Concepts in Oracle

    Hi all,

    Partitioning is one of the most stable, proven and efficient features of Oracle. It defines proper segregated format of data management along with boosting up the query performance. Recently, I published my article on Partitioning concepts at Exforsys. The article covers theoretical concepts involved in the feature. Continue reading the complete story from the below link

    http://www.exforsys.com/tutorials/oracle-11g/oracle-partitioning-overview.html

    Hope you all enjoy the reading. Post your feedback and comments.

    Thanks all. I'll be back with some more news and sharings. Bye for now

    Saurabh

    Thursday, 29 December 2011

    Warm wishes for New Year 2012

    Hi All,

    Before the dawn reaches the dusk, before the verticals meets horizons, let us together welcome a New Year of warmth, prosperity and growth.

    May the yer 2012 brings all greats, loads of love, happiness, and ample of opportunities of growth and survival.



    SbhOracle would enter into its second year. 2011 has been a great year of establishment, reachability and credibility. And yes, it made a mark in alot more interactions in techworld.

    Happy New year in Advance!!

    Love you all,

    Saurabh

    Saturday, 24 December 2011

    My publication at RMOUG SQL> Update


     Hi Guyzz,

    Finally I made my publication into Winter issue of SQL>Update, the quartely journal of RMOUG. Thanks to Peggy King and Pat Van Buskirk for the great work and support in the process. Really it looks as an achievement to share the cover page with Tom Kyte  (Ask Tom)

     





     

     

     

     

     

     

     

     

     

    My article reads about Inheritance in Oracle. As one of my earlier post talks about the abstract, the paper show the implementation of object model with a sample case study and forecasts it as an upcoming data model. Surely, the object model comfortably fits into OOPs based application requirements and offers better integration too.

    You can find the complete story of the paper from the below link

    Inheritance in Oracle by Saurabh Gupta (SQL Update Winter11 Issue RMOUG)

    Do post your commets and feedback/suggestions. See you RMOUG again in Spring Issue.

    Bye for now

    Saurabh

     

    Saturday, 17 December 2011

    Sangam11 pics

    Here I come with the pics from Sangam11

    [gallery link="file" columns="1"]

    Enjoy

    Sunday, 11 December 2011

    AIOUG Sangam 11

    Hi Guyzzz

    Just back from AIOUG Sangam11. Wonderful effort, event, sessions and most important grrat stage to share with some great names. Arup Nanda, Murali Vallath, Kuassi Mensah and many more. Kudos to the arrangement and and event management too.



    The Day 1 (9th Dec) started off with registration. Was glad to see our bags and great material. Saw Murali at the doorstep and the day started off.

    Murali addressed the session and thanked the event management team and introduced Arup to kick off the session. Arup Nanda 'The LONGTIME DBA' was the Show Stopper of the whole event. And he should be !!

    Rich Niemiec started off with a session on Rolta. He showed us some pics of Oracle Corp...was amazed to be the part of it.





     

     

     

     

     

     



    Arup started off with a session on Profiler in PL/SQL. Great sessions, great views and great information. Kuassi Mensah delivered a nice session on Oracle Net security. Murali too gave a presentation on RAC subject, but couldn't catch up match as I have no background. Hemant came up with the day to day challenges of a DBA, their role and expectations. Fabulous !!

    Day 2 (10th Dec) again saw a long session from Arup until Lunch. Superb stamina and grasp !! Got to know some new concepts on Cache fusion, DBA best practices, and introduced the logic behind Exdata. I could see the roadmap of DBA to DMA (Database Machine Administrator). Again a good one!!

    Meanwhile I got introduced to Arup Nanda with a handshake and told him about myself. Told him about my online works and he asked me to get in touch for SELECT journal too. Nice chat time !!

    Later I attended session by Hemant on Partitioning. Though it was an elementary one but enough to fill up 1 hour session. The next session by Prabhakar Gongloor was another masterpiece where he showed some screendumps of Oracle 12C. I believe we would be only of those few ones who could see it within 2 months of the version release. I could see him hiding something by saying its 'Special Technique' through which EM can connect to DB even if it is down (as far as I could understand).

    As I referred one of my colleague for the seminar, I received a coupon worth INR500, redeemable on the same day against the books at the counter. I got one copy of Oracle XML DB.

    The conference ended with photo sessions. I too got few with Arup, Bryn, Rich and Mensah. Soon I would publish on my blog. Received a Tshirt from OTN too.

    Next year, it would be in August, 2012...I will be happy to volunteer the event and would surely like to see myself at the stage right there :)

    Once again, Thanks Oracle, Thanks AIOUG !!

    By for now

    Saurabh

    Friday, 25 November 2011

    Register for Sangam 2011 at AIOUG



    Don't miss chance to meet ACEs and some great Oracle DBA and Developer sessions.

    Sangam 2011.

    See you all there !!

    Thursday, 17 November 2011

    Create a table with only scale specification for a column

    Hi All,

    Just came across a peculiar way of specifying only the column scale and not its precision, so thought of sharing with all. It looks pretty simple but could be a handy tip for table designs.

    Scenario: Create a table CONT_EMPS where Salary column must store values upto 2 places of decimals (i.e. scale is 2). Here, note that no precision has been specified for the Salary column. Lets see how to do it.

    SQL> CREATE TABLE CONT_EMPS
    2 (EMPID NUMBER,
    3 EMPNAME VARCHAR2(256),
    4 SAL NUMBER(*,2))
    5 /
    Table created.


    SQL> DESC CONT_EMPS
    Name         Null?    Type
    ------------ -------- ----------------------------
    EMPID                 NUMBER
    EMPNAME               VARCHAR2(256)
    SAL                   NUMBER(38,2)


    When I specify '*' in place of precision, Oracle treats it as the maximum precision allowed for the column. Additionally, this convention doesn't applies to PL/SQL data type declaration.
     
    Bye for now.
    Saurabh

    Related articles

    Sunday, 6 November 2011

    PL/Scope and PL/SQL Hierarchical Profiler in Oracle 11g

    Hello world,

    Ever since the release of Oracle 11gR2 in 2009 under the theme "Consolidate. Compress. Control", its new features have always been the talk of the conferences and meetings. But besides the compression, control and other development features, there were several other features which have got less weightage. I shall present my walkthrough experience in the below link (which has been published by Exforsys).

    PL/Scope and DBMS_HPROF

    Hope you enjoy reading the complete story and post your feedback and comments.

    Thanks, bye

    Saurabh


    Saturday, 5 November 2011

    Enable Encryption for SecureFiles

    Last week, I was trying to enable ENCRYPTION property for Oracle 11g Secure File. But I couldn’t find sufficient information on the web. However, I have tried it now and would like to demonstrate on my blog.

    Suppose I have a table EMPLOYEES where employees image (BLOB) has to be loaded into the database. You want to compress it and encrypt it as per AES192 encryption standard.

     Let us see how to do it. 

    1. Compression can be easily enabled for the BLOB as below

    ALTER TABLE EMPLOYEES
    MODIFY LOB (IMAGE)
    (
    COMPRESS HIGH
    )
    /

    Table altered.


    2. Enabling the encryption feature for the IMAGE column in EMPLOYEES table

    The TDE is an encryption system which encrypts the columns value with a confidential key. An encrypted key can hold multiple encrypted columns of same table. There exists second level of security where the column keys are again encrypted with database’s master key. But note that none of the keys are stored in database. They reside within an Oracle wallet. An encryption wallet has to be set as an external security module before enabling the feature for the LOB column.

    Step 1: Create a Folder C:\ExternalSecurity\Wallets\ on the Oracle database server to store the Transparent Data Encryption (TDE) wallet.



    Step 2: Edit the SQLNET.ora file at \\ORACLE_HOME\NETWORK\ADMIN location on the server. Include the ENCRYPTION_WALLET_LOCATION to indicate the location of the TDE wallet.

    ENCRYPTION_WALLET_LOCATION=
    (SOURCE=(METHOD=FILE)
    (METHOD_DATA= (DIRECTORY= C:\ExternalSecurity\Wallets)
    )
    )




    Step 3: Open the command prompt on the server machine to reload the server

    Reload the Listener using RELOAD command




    Step 4: Now login as DBA

    Set the encryption key along with its password

    SQL> ALTER system SET ENCRYPTION KEY IDENTIFIED BY "wallet";

    System altered.


    The ALTER SYSTEM command above keeps the wallet open until the database is up. If the database is down and restarted subsequently, the wallet has to be explicitly opened.

    The error message raised below is not an error since the wallet gets automatically opened while setting

    SQL> ALTER system SET ENCRYPTION WALLET OPEN IDENTIFIED BY "wallet";
    ALTER system SET ENCRYPTION WALLET OPEN IDENTIFIED BY "wallet"
    *
    ERROR at line 1:
    ORA-28354: wallet already open


    Step 5: Login as SCOTT user

    Enter user-name: SCOTT/TIGER
    SQL> ALTER TABLE EMPLOYEES
    2 MODIFY
    3 (
    4 IMAGE ENCRYPT USING 'AES192'
    5 );

    Table altered.

    SQL> SELECT *
    2 FROM user_encrypted_columns;

    TABLE_NAME COLUMN_NAME ENCRYPTION_ALG SAL INTEGRITY_AL
    ---------- -------------- ----------------------------- --- ------------
    EMPLOYEES IMAGE AES 192 bits key YES SHA-1


    Step 6: Verify the server wallet location. Check the ENCRYPTED WALLET LOCATION directory. You can find the ewallet.p12 filer created.



    Note that the table carrying encrypted column(s) cannot participate in conventional export or import process. But data pump rescues the situation by supporting encrypted exports and imports.

    Tuesday, 25 October 2011

    Happy Diwali to all

    Dear All,
    I wish you all a very happy, safe, cracking, sparkling and colourful Diwali.  Have a great year ahead !!!

     



    [caption id="attachment_268" align="alignleft" width="111" caption="India breaks away"]India breaks away[/caption]


     

     

     

     

    Indian cricket has already gifted the Diwali gift with cracking clean sweep over England :)

     
     

     

    Monday, 24 October 2011

    Protect your database with VPD

    Hi All,

    Database security is an important aspect of database management and administration. Several database security solutions have been designed to prevent database from corruption, hacking threats, and unauthorized data access.

     Fine Grained Access Control (FGAC) is one of the security approaches which allow the logical and virtual partition of a database. In a multi user database environment, it becomes cumbersome activity to segregate schema and thus the data, based on user roles. Therefore, a security policy was required which can apply row level security and allows the current user to access only authorized data. For example, in an EMPLOYEE database, all managers can access only Managerial data, all HRs can view only HR related data and so on.

    FGAC is also known as Virtual Private Database. It is because fine grained access can only be achieved after the database has been ‘virtually privatized’ for a user.

    Thanks to Exforsys for publishing the paper. Read the complete story in the below link

    Implement VPD in your database

    Do post your comments/queries/feedback.

    Saurabh

    Thursday, 20 October 2011

    Result Caching feature in Oracle 11g

    Caching has always been the pick of the programmers world. These days applications formulate and maintain different strategy for Cache Manager. Database presents an efficient cache manager which is capable of caching the SQL query results, PL/SQL functions results and client OCI result cache.

    In earlier versions of Oracle, caching mechanism was limited up to architectural concepts, but Oracle 11g makes it a programmer’s tool to explicitly govern the application performance.

    My obligations to Exforsys to publish my write up on result cache feature in Oracle 11g

    Read Result Cache in Oracle 11g

    I 'll be back with some more new findings.

    Bye, SBH

    Tuesday, 18 October 2011

    PLSQL_OPTIMIZE_LEVEL: The optimization strategy of Oracle

    Oracle initialization parameter PLSQL_OPTIMIZE_LEVEL

    The parameter was introduced in Oracle 10g to decide the level of optimization applicable for a program unit during compilation. The optimization during compilation means the removal of dead code, code movements to optimize iterative constructs, inline the calls if required, and choosing the best philosophy to optimally compile the program.

    It is set by the DBA at system, session and object level. It is the object compilation parameter which is retained by the object library unit. It can be queried in USER_PLSQL_OBJECT_SETTINGS view for a given object.

    Prior to 11g release, the parameter could accommodate only three valid values i.e. 0, 1, and 2. Oracle 11g introduced an additional optimization level 3. By default, the parameter value is 2. The compiler’s effort is directly proportional to the parameter value i.e. more the value, more the compiler’s effort.

    It can be set using ALTER [SYSTEM | SESSON] command as shown below

    /*To view the current parameter setting*/

    Conn / as SYSDBA
    Connected.

    SQL> show parameter plsql_optimize_level

    NAME TYPE VALUE
    ------------------------------------ ----------- -----------------
    plsql_optimize_level integer 2

    /*Modify the setting for the current session*/
    ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL = 1
    /

    Session altered.

    The description for each value is as below

    Case 1: PLSQL_OPTIMIZE_LEVEL = 0

    This level represents ‘No Optimization’ mode of the compiler. The compiler only maintains the code evaluation order and executes it without any efforts on code optimization.

    Let us write a small program and compare the same with other optimization levels also

    Scenario: In your application, you have to give insert a delay of approx 1 second during some user operations. You create a program which runs a large loop to delay the control transfer.

    Conn / as sysdba
    Connected.


    ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL = 0;

    Session altered.

    DECLARE
    L_START_TIME NUMBER;
    L_END_TIME NUMBER;
    A NUMBER; B NUMBER; C NUMBER;
    BEGIN
    L_START_TIME := DBMS_UTILITY.GET_TIME();
    FOR I IN 1..1000000000
    LOOP
    A := 1;
    B := 1;
    C := A+1;
    END LOOP;
    L_END_TIME := DBMS_UTILITY.GET_TIME();
    DBMS_OUTPUT.PUT_LINE('Execution time:'||TO_CHAR(L_END_TIME - L_START_TIME));
    END;
    /

    Execution time:19294

    PL/SQL procedure successfully completed.

    Case 2: PLSQL_OPTIMIZE_LEVEL = 1

    This level represents ‘Elementary and eliminative Optimization’ level by maintaining the same code order. The compiler optimizes the code by eliminating the code of irrelevant logic.

    We shall re execute the previous PL/SQL block and check the difference.

    Conn / as sysdba
    Connected.


    ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL = 1;

    Session altered.

    DECLARE
    L_START_TIME NUMBER;
    L_END_TIME NUMBER;
    A NUMBER; B NUMBER; C NUMBER;
    BEGIN
    L_START_TIME := DBMS_UTILITY.GET_TIME();
    FOR I IN 1..1000000000
    LOOP
    A := 1;
    B := 1;
    C := A+1;
    END LOOP;
    L_END_TIME := DBMS_UTILITY.GET_TIME();
    DBMS_OUTPUT.PUT_LINE('Execution time:'||TO_CHAR(L_END_TIME - L_START_TIME));
    END;
    /

    Execution time:7112

    PL/SQL procedure successfully completed.

    Note that the execution time has reduced by 60% during this optimization level.

    Case 3: PLSQL_OPTIMIZE_LEVEL = 2

    This is the standard level of optimization where the compiler intelligently does the code refactoring and uses advanced optimization techniques to modify the code structure in order to achieve the best.

    Re executing the previous PL/SQL block to compare the ‘Execution time’ results.

    Conn / as sysdba
    Connected.


    ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL = 2;

    Session altered.

    DECLARE
    L_START_TIME NUMBER;
    L_END_TIME NUMBER;
    A NUMBER; B NUMBER; C NUMBER;
    BEGIN
    L_START_TIME := DBMS_UTILITY.GET_TIME();
    FOR I IN 1..1000000000
    LOOP
    A := 1;
    B := 1;
    C := A+1;
    END LOOP;
    L_END_TIME := DBMS_UTILITY.GET_TIME();
    DBMS_OUTPUT.PUT_LINE('Execution time:'||TO_CHAR(L_END_TIME - L_START_TIME));
    END;
    /

    Execution time:0

    PL/SQL procedure successfully completed.

    Just observe the incredible intelligence of the PL/SQL compiler. The complete code has been re-structured. Analytically, the code inside the FOR loop is not relevant to the loop. So it has been moved outside the loop and now, the loop is completely ignored by the compiler. Therefore, the execution time comes out to be zero.

    Case 4: PLSQL_OPTIMIZE_LEVEL = 3

    This is the latest optimization level introduced in Oracle 11g. It is a sort of ‘Forced’ optimization level, which Oracle terms as ‘High Priority’ optimization. The code optimizer does the code refactoring and automatically inlines all program calls in the program unit.

    Conn / as sysdba
    Connected.


    ALTER SESSION SET PLSQL_OPTIMIZE_LEVEL = 3;

    Session altered.

    As mentioned earlier, the parameter is treated as the object compilation factors. Hence it is stored in the object library unit and can be queried in
    [ALL | DBA | USER]_PLSQL_OBJECT_SETTINGS.

    Refer Oracle 11g Documentation on the topic

    Friday, 14 October 2011

    My RMOUG abstract (Inheritance in Oracle)


    Duke, the Java Mascot, in the waving pose. Duk...

     




    Inheritance in Oracle: Exploring the Descendents
    "The Abstract Object model of database is an under implemented and commercially unexplored flavor of database. In the late 1980s, relational model of Oracle faced several deficiencies, which forced the evolution of Object model. Undoubtedly, relational model did all well for flat data storage, maintenance of integral data, and information security but could not offer concrete approach to accommodate complex data structures of nested, hierarchical, and extensible type. These subtle restrictions led the adoption of OOPs concepts in database systems.

    Object oriented model of database carries the essence of object oriented concepts like Inheritance, data instantiation and abstraction, and establishment of relationships among types. It ensures persistent data management, effective compatibility and integration with OOPs supported languages like C++, and JAVA, which are the best market flavors of application development.

    The article shall be a fair effort to explore the Object model of Oracle. The scope of the study shall include the evolutionary background, comparative drive with RDBMS, commercial study and a lot more details. I shall present a sample case study to highlight the structure building implementation and demonstrate the working of common data tasks."

    I shall post the link once the paper gets published at RMOUG journal.

    Bye for now, SBH