Today I started with an Oracle Administration course and just finished the “Database Architecture” part. Well, not really new stuff for me. They told me think like: What’s the SGA, PGA (they didn’t say anything about the UGA), background, server and user processes, what’s the diffrence between database, instance and server and a little overview of which work the processes perform. All in all a course which go to less in detail of the components for me. All the stuff they told me I already know and with know I mean: I know it in much more detail! But to be fair, I’m sure that it’s not a bad course for people who starting to be a DBA. And that was just the first session of the course, so we”ll see if the others are more interesting for me!
Today following question came up: Would the JDBC driver of Oracle regonize it, when you set the setMaxRows and perform a SELECT using the FOR UPDATE clause. Example: You’ve a table with 40 rows. Now you call setMaxRows(20) so that you only would get the first 20 rows and perform the select without any where clause (I know, not really a pretty solution: Instead of using rownum, you would select all rows and just stop fetching at the 21th row, but however). Would you now lock all 40 rows or just 20. Well, the answer is (I’ve expected it): You get a row lock on the entry table, not only the first 20 lines. With rownum in the where clause it is now problem. You just lock the selected 20 rows and the other 20 are available for other transactions. So developers: Use the rownum pseudo column instead of the setMaxRows function specially if you perform a select… for update!
But the nicest thing on this little test: I wrote my first Java code since 4 years! 🙂
Oh damn, I just get through a presentation of Steven Feuerstein and found out, that PL/SQL supports object-oriented programming. I’m sure, now you think: Why does this stupid guy mean “oh damn…”. Because this “feature” is available since 8i and got strong on 9i. And now they already released 11g! So I didn’t know this possibility several years ago! Well but now I know it and I find it pretty cool, because PL/SQL gets more and more powerful (there are also supported functions for file I/O, HTTP, XML and many many more). Also external or java stored procedures were a big step forward. I just can recur me: Pretty cool!
What do you usually do on a Friday night? Go out with your friends, finish some work, or just watch TV and then go to bed? Well, today I spent my Friday night in the office (like real DBA’s). Why? Well, our unix admin change the configuration of the servers and of course the DBA also has to check afterwards, if everything is right with the databases. And it was a good decision to came. Actually all database were down except of one. And it was a good chance to patch one of them. Well, now it’s 12:09 AM (on a Saturday morning), the unix admin is still working, but I’ll now drive home and go to bed.
Oracle 11g is already available and I just finished reading the “New features guide” of Oracle 11g. There are some really nice features in it: Flashback Transactions, CONTINUE-Clause in PL/SQL, Data Revovery Advisor, SQL Test Case Builder, Automatic Health Monitor, SQL Performance Analyzer just to name some few. I’m really excited if all this features work as Oracle promises, but I’ll finally see, when I’ve installed the database on my test system.