Skip to main content

Posts

Showing posts from 2011

Save Exceptions Vs DML Error Logs

Hi Friends, Recently for one of the functionality in my app, I was working on the bulk data operation. To handle the bulk data movement with DML exception handling Oracle Provides us two inherent functionality,             1.        Save Exceptions : http://rwijk.blogspot.com/2007/11/save-exceptions.html             2.        DML Error Logs : http://www.orafaq.com/node/76 So, I was evaluating on both the approaches, here is what I have came up to so far, Performance for Save Exceptions Vs DML Error Logs, a.        Save exception works better for the large data volume over DML Error logs. -           You can keep better control on the number of rows been process in particular iteration by configuring Bulk collect row count limit. -           This will help you in keeping the resources free by putting the commit after particular/Logical interval. b.       For lesser size of the data we can go with DML Error log option. -           Using DML error log with Direct path inserts gives us

Sequences in Oracle RAC

Few days back, I had seen some magical behavior of oracle sequences. We got a complaint from users about missing on some data. When we check database and SQLs, logically it must have traveled in data files. After analyzing the data download plug-ins, file status screen we found that, 17 files have the same name around time frame of 1658Hrs to 1735Hrs. We are using the Oracle Sequence Number to allocate the file name uniquely, and then also why file names are duplicate?? What's wrong there??  -- After 1636hrs oracle started allocating the sequence number with lesser value than the current one and continued till 1740Hrs.    -- The file allocation logic was looking for max file ID value.  -- Which coming out to be same for this entire time frame; as new file ID has lesser value than the old file ID. How this happened ??   In an Oracle RAC cluster, the sequence numbers returned were not in order... The reason is that by default sequences in 10g\11g RAC are created without ordering

Some facts and Figures of WCF

SOAP Message in WCF: 1.        The max size of SOAP message in WCF is 9,223,372,036,854,775,807 bytes. Including metadata. 2.        For actual user data we can use 2,147,483,647 bytes out of it. 3.        With default setting WCF uses only 65536 bytes. 4.        We can change it by setting maxReceivedMessageSize in clients app.config file.    5.        So selection of data types in Data Contract and Data table will matter a lot! 6.       Reference :   http://blogs.msdn.com/drnick/archive/2006/03/16/552628.aspx          http://blogs.msdn.com/drnick/archive/2006/03/10/547568.aspx       “Amazing blog for WCF!” Data Contract: 1.        By Default WCF can serialize 65536 DataMember. 2.        We can change it to max  2147483646. 3.       How?  Please go to: http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/4a81a226-175b-41d3-864a-181792c71ffe Tracing WCF service message: 1.       Enable message log of WCF: http://www.avingtonsolutions.com/blog/post/2008/07/25/Tracing-SOAP-Message

Conventional and Direct-Path Insert

Today I came across one interesting scenario, Where was using Insert statement with hint /*+ APPEND */. With traditional insert statement we can use it like: INSERT INTO SHIPMENTLIST (<<Column list>>) VALUES (<<List of Values>>); INSERT INTO SHIPMENTLIST (<<Column list>>) VALUES (<<List of Values>>); . . INSERT INTO SHIPMENTLIST (<<Column list>>) VALUES (<<List of Values>>); However when you use same with hint /*+ APPEND */ INSERT /*+ APPEND */ INTO SHIPMENTLIST (<<Column list>>) VALUES (<<List of Values >>); INSERT /*+ APPEND */ INTO SHIPMENTLIST (<<Column list>>) VALUES (<<List of Values >>); Oracle raises run time exception: ORA-12838: cannot read/modify an object after modifying it in parallel.   This happens because, when we use the Append hint oracle uses direct-path INSERT and Data is written directly into datafiles, bypassing the buf