OraStory 2008-09-07 13:25:58

Page hits

Another landmark - this morning the blog counter reached 750,000. It’s taken a little longer to get the third 250,000 than it did the second - but given how little I’ve written over the last few months it’s still a pleasant surprise. WordPress supples some interesting stats, so I’ve copied up the top three entries for [...]

Alternative OOW08 show badge Mikons

Justin Kestelyn through Matt Topper had the excellent idea of adding Mikons to the OOW show badges for 2008. I thought I'd propose some of my own, because as Justin says, Mikons negate the need for minor chit-chat when meeting new people at OOW.

Imagine all the minor chit-chat you're going to avoid wearing these beauties! ;-) Maybe you'd like to propose some of your own.

Like last year, it's a rather slow blogging time while I prepare for OOW and the AUSOUG conferences in October.

RocknRolla…

Lock, Stock and Two Smoking Barrels was cool. Snatch was good. Revolver is a great, and totally underrated film, but RocknRolla is complete class. It’s an 11 out of 10. Guy Ritchie has done an awesome job with this film. It’s a combination of gruesome, clever, funny and stupid. All the cast are great, but Mark Strong and Toby Kebbell are exceptional. I think this is probably the perfect UK gangster film. Even better than The Long Good Friday, and that’s going some.

I love US gangster stuff like Goodfellas and Casino, but I guess something a bit closer to home always resonates a bit more.

I’m really chuffed now. )

Cheers

Tim…

Hey, we have a journeyman !

Congrats to Denes Kubicek for being the first journeyman on OTN.

OTN stars Justin and Nicolas (18954 and 15321 posts) do not get this title, as we Oracle Ace are sticked to our Ace logos. OTN upgraded the forums recently, many posts about this :

  • OTN Forums - Change the look and feel yourself
  • OTN Forums Update - Take Two
  • New OTN Forums - not great yet
  • OTN forums get a new look
  • OTN Forums Upgrade
  • Forums.oracle.comUpgrade: New Rewards System/Known Issues
  • In the last link, Justin explains the new ranking system. Aces are aces, and everyone else but Denes are newbies ;)

    Ow, I forget, they got smileys too

    Happy :) )
    Sad :( (
    Grin :D D
    Love :x x
    Mischief ;\ ;\
    Cool B-) B-)
    Devil ]:) )
    Silly :p p
    Angry X-( X-(
    Laugh :^0 ^0
    Wink ;) ;)
    Blush :8} 8}
    Cry :_| _|
    Confused ?:| |
    Shocked :0 0
    Plain :| |

    addthis_url = 'http%3A%2F%2Flaurentschneider.com%2Fwordpress%2F2008%2F09%2Fhey-we-have-a-journeyman.html'; addthis_title = 'Hey%2C+we+have+a+journeyman+%21'; addthis_pub = '';

    Advert - UKOUG Conference

    The agenda for the UK Oracle User Group annual conference is now available. If you like the look of the “Masterclass” events on the Friday, remember that you have to pre-book them.

    Splotlight on me about a spotlight on me

    A small post to spotlight the fact that the OOW team published a spotlight on my upcoming OOW session.

    Oracle 11g Partitioning

    Last time I mentioned that I have been helping Mark with some demonstrations of the Data Warehouse features of modern (notably 11g) Oracle databases. Having a few minutes spare I decided to take a look at partitioning.

    I have long been a fan of partitioning or at least Oracle’s implementation of it - the first time I used it was back in Oracle 8i with a 4.5 TB data warehouse running on a large chunk of iron with an massive number of disks, 4.5 TB is a large number of disks if the biggest disk drive you could get was 18GB!

    I digress, if I was told that I could use only one feature in a data warehouse I would think long and hard about partitioning and bitmap indexes and probably side with partitioning; you may ask about parallel query, but that can be tricky to exploit well and there are too many pitfalls for the unwary.

    Being an old hand with partitioning you get to know some of the quirks and develop techniques to handle them and to perform the routine tasks that a DBA should not have to do by hand; for example maintaining a rolling window of partitions (range on date) by dropping the oldest partition and creating a new one. You learn that it is sensible to encode the date into the partition name as that might be easier to process in your partition manipulation scripts than using the high_value stored in the xxx_TAB_PARTITIONS as that is a long and thus a bit more tricky to parse in a block of PL/SQL. You learn that for a partitioned index organized table you need to to look in xxx_IND_PARTITIONS

    But when a new release of Oracle comes out with something called interval partitioning you sometimes dismiss it with a on off-the-cuff “oh, but that won’t work for me as I need to know the name of the partition I am dropping and a system generated name won’t cut it”. Which is really another way of saying that you have not looked at the Oracle 11g SQL manual to see that there are new extensions to the partition maintenance ALTER TABLE commands and good old DELETE, UPDATE and INSERT. These extensions  now permit you to specify the partition by stating a value of the partition key rather than having to know the partition name: PARTITION FOR (TO_DATE(’1-JAN-2007′, ‘dd-mon-rrrr’)) is a much more elegant solution to storing the partition range value in it’s name.

    So what happens when you insert into a non existing partition on an interval partitioned table? Just what should happen; a new partition is created. And, interestingly, if there is a gap in your data it only creates the partitions need for the data being inserted. And if more data arrives later to fill the gaps, the required missing partitions are created. This looks a pretty good feature to use, unless you use partition exchange; in that case you still need to create the partition before exchanging it.

    ORA-1555 after switchover to standby

    This week started with diagnosing an interesting situation that didn’t seem to be talked about much (maybe because it is a relatively “old” problem–explanation in a minute), so I thought I’d share the experience for everyone’s benefit.

    The situation involves a 10.2.0.1 (<gasp>) database on Linux 32-bit RHEL 4. The database is in flashback mode and has a single physical standby database with Data Guard configured in maximum availability mode. The standby was configured relatively recently and had never been tested with a switchover. The switchover was scheduled and conducted without much issue.

    The switchover to the standby database was done, application brought up against the now activated standby database and there were no issues reported. Some basic testing was done for about 30 minutes, no application errors, no database errors.

    Once satisfied that the standby database was viable and worked, the customer wanted the original production database server to be put back into the primary role. Another switchover was executed without issue and the applications were again reconfigured to access the primary database and brought up. It was at this point that the alert log started showing many (100+ per hour, during low utilization period) errors like these:

    ORA-01555 caused by SQL statement below (SQL ID: 74rfy9pxwabb4, Query Duration=0 sec, SCN: 0x0003.52c296c8):
    

    This error was puzzling since the query duration is 0 sec, so it isn’t a undo_retention issue. These statistics from v$undostat were also puzzling.

    
                                Tuned Undo # Unexpired  # Expired   ORA-1555 Out-Of-space  Max Query
       INST_ID BEGIN_TIME        Retention      Stolen     Reused      Error        Error     Length
    ---------- ---------------- ---------- ----------- ---------- ---------- ------------ ----------
             1 09/02/2008 12:59       1500           0          0          7            0        136
             1 09/02/2008 13:09       1500           0          0          3            0        137
             1 09/02/2008 13:19       1500           0          0          4            0         37
             1 09/02/2008 13:29       1500           0          0         12            0         27
             1 09/02/2008 13:39       1500           0          0          5            0         19
             1 09/02/2008 13:49       1500           0          0          0            0         23
             1 09/02/2008 13:59       1500           0          0          0            0         66
             1 09/02/2008 14:09       1500           0          0         19            0        157
             1 09/02/2008 14:19       1500           0          0         22            0        142
             1 09/02/2008 14:29       1500           0          0         14            0          0
             1 09/02/2008 14:39       1500           0          0         10            0          0
             1 09/02/2008 14:49       1500           0          0         17            0        114
             1 09/02/2008 14:59       1500           0          0          3            0          0
    

    Seeing that Max Query Length is at least an order of magnitude less than the undo_retention (1500), there’s no reason why the ORA-1555 errors should be occurring–especially more than 20 in a 10-minute interval. At this point, I concluded that we must be hitting a bug. After all, these statistics were complete inconsistent with logic and we are on 10.2.0.1, so it seems pretty likely that others have probably hit this issue before given the 3+ years of field experience that 10g Release 2 has.

    It took a few tries, but eventually, I located Oracle BUG 5380055 which is documented in Metalink Note 386830.1. It affects environments on 10.1.0.5, 10.2.0.1 or 10.2.0.2 that have flashback database enabled and conduct two switchovers. There are some other scenarios that will trigger the bug as well, but this scenario fit our circumstances.

    Luckily, the note suggests that there is a patch. I looked and was lucky to find that 10.2.0.1 does indeed have a patch available for our platform. Following the procedure to install the patch on both primary and standby environments is supposed to prevent the issue from occurring in the future. A second procedure after the patch is installed is required to “fix” the issues that were introduced in to the database by the bug. I don’t really understand the internals of the issue well enough to understand how this fixes it, but the fix is to set these two parameters in the primary instance:

    *._allow_error_simulation = TRUE
    *._smu_debug_mode = 268435456
    

    Then, start the primary instance in restricted mode. Remove the parameters and restart the primary instance in normal mode and the problem(s) should be gone. The standby database will receive the fixes in the redo stream, so there’s no additional procedures to conduct on the standby side. In our case, it worked well and the entire downtime to install the patch and conduct the restart procedure was about 15 minutes.

    Obviously, we long ago recommended to this customer that they update their patch level to 10.2.0.3 or 10.2.0.4. The application they use is custom written in-house, so the only barrier to the upgrade is the time necessary to test the patchset. They will upgrade soon–I’m sure this issue will help motivate them even more.

    Pete Scott’s random notes 2008-09-05 15:28:20