SQL Developer in production…

Some time towards the end of last week I saw a blog post saying a new early adopter release of SQL Developer was available. I went to OTN to download it today, and there is now an official production release available. That came out pretty sharpish! 🙂

Cheers

Tim…

What a day!

Yesterday was a tough day…

I had a call at 02:30 about an extract job (written in Java) that was taking hours to run. After 2 hours of pratting about trying to get it working I gave up and went back to bed. As soon as I got to work I recoded the process in PL/SQL. It was a case of “if it compiles it must work”, because we had very little time to test the process before the next run was required. Fortunately, it worked fine. Did it improve the situation? The original extract took several hours, the PL/SQL version took 23 seconds. Sweet!

What was slowing down the original process? Some bright spark thought it would be better to pull back a huge table into an array and loop through it to searching for data, rather than writing a query to pull back a single row. This action was repeated for every line written to the extract file. There were an assortment of other classic bits of code also, including (the names have been changed to protect the “not so” innocent):

switch (getType())
{
case TYPE_CONST1:
sb.append(TYPE_CONST1);
break;
case TYPE_CONST2:
sb.append(TYPE_CONST2);
break;
}

Now, I’m no Java Guru, but for a mandatory item with only two allowed values, I instantly spotted that this actually meant:

sb.append(getType());

Conclusion: If you want data-intensive code to run fast, put it in the database and get someone who understands databases to write it!

Once all the fuss was over, I noticed that the front page of my website wasn’t working properly. It turned out that the OTN RSS news feed was broken, and my dodgy PHP code didn’t trap the error very well. I fixed the error trapping and informed Oracle about the news feed. Within a few minutes the OTN news feed was restored, so all was fine again.

Conclusion: My PHP isn’t as good as my PL/SQL 🙂

Cheers

Tim…

Auditing in Oracle 10g Database Release 2…

I wrote/revamped an article yesterday called Auditing in Oracle 10g Database Release 2. Most of the information was already present on the site, but it was spread across several articles including an 8i article and several new features articles for 9i and 10g. Rather than write a small article on the XML audit trail in Oracle 10g Release 2, I thought I would bring the whole lot up to date.

One point I spotted was an unusual change in the AUDIT_TRAIL parameter. In 10g Release 1 there was an allowed value of DB_EXTENDED, which indicates that the audit records should go to the DB audit trail and the SQL_TEXT and SQL_BIND columns should be populated. In Release 2 this has been changed to DB,EXTENDED. Can’t see the point in this change myself. Personally, I would not have been offended by XML_EXTENDED, rather than XML,EXTENDED… 🙂

Whatever…

Cheers

Tim…

The life of a DBA…

Person: Is there a problem this morning?
DBA: A problem with what?
Person: Application “X” is throwing out errors. Do you know what’s going on?
DBA: That’s wierd, as far as I know nothing has changed on that project recently.
Person: They put some new software live yesterday, but they are sure that’s not the problem!
DBA: Which server are they seeing the problem on?
Person: Server “Y”.
DBA: The applications on that server don’t connect directly to the database. It doesn’t even have an Oracle client loaded.

So let me see:

  • The specific application does not, and has never, connected to the production database.
  • Some new software went live yesterday.
  • The problems they are seeing must be related to the production database. It can’t possibly be due to the new software put live yesterday!

I’m sure there is logic somewhere there, but I’m just too stupid to see it 🙂

Cheers

Tim…

New article and a little surprise for me…

Somebody asked me how to install Oracle9i on Red Hat 4.0, so I wrote quick how-to. Personally, I can’t see the point. Why run an old version of Oracle that requires you to make RHEL 4 think it’s RedHat 9? Each to their own I guess.

A number of bloggers have mentioned the new Oracle blogs site, so I thought I’d check it out. I was more than a little surprised when I found my blog listed there. I’m a very “off-topic” blogger and my opinion of Oracle is not always flattering. I guess I slipped through the quality control net…

Now, who do I need to bribe in order to get one of those little ACE images? 😉

Cheers

Tim…

Exit mobile version