Travis Laborde Blog

play boxing daddy?

Does Oracle Suck? Or just Oracle DBAs?

Since leaving the job I was at for 8 years, I've had three gigs since December.  First I took a contracting gig to get me through the holidays, at Centocor.  This was a great experience, and I'll have to post about that one day.  When that was up (even though they wanted to extend me) I took what I thought was going to be a great full time position at a company I'll leave un-named :)  This was a horror story for another post.  I left there as fast as was possible, and landed now at a truly great place to work.

The funny thing is - all three of these places are big Oracle shops.  So, I've had my first experiences with Oracle.

At Centocor, they were doing their first big “validated” SQL Server rollout, and wanted to bring in someone to sort of “be there” to help them get it all sorted out, and to get thier practices in place, etc.  Basically I worked with the Oracle DBA's and tried to show them how to accomplish in SQL Server the things they already knew how to do in Oracle.  And I wrote a lot of scripts :)  If you've never gone through a 21CFR11 Validation, be glad - it's a LOT of documentation.

At the “other” company I was the team lead and manager on some very cool and complex Windows software in .old and .NET.  Oh, how I wish things would have been better there.  I'll post about that one day when I know how to do it without being mean.

At the new place, I'm “just a developer” trying my best to do everything in .NET and maintaining the .old stuff when they force me to.

But at any rate - at all three companies I've noticed something regarding Oracle usage that is driving me crazy:

No stored procedures.  All three companies insist on the developers writing their SQL as a bunch of sql = sql + ... command.  UGH!

OK, maybe Centocor had some sprocs.  But there was a lot of dynamic stuff going on there.  The “other” company told me there were performance issues with using stored procedures in Oracle.  What?  Of course I had no idea, but deep inside I was sure I was talking to idiots.  Did I mention I hated the place?  This is the same place where the database group would change the schema and not tell the GUI developers until the app failed in QA :)

Now, even where I am now, I'm finding a LOT of dynamic SQL.  NOT for cross-platform compatibility purposes, but the DBAs really don't want to create sprocs.  What?  Why?  Again, I'm told it's a performance issue.  Something about sprocs taking up all the RAM.  I can't stop laughing, but - is there any merit to this?

Of course, we also have three different versions of Oralce, none of which support ANSI joins so I'm pulling my hair out trying to write even simple queries.  How has Oracle survived without this?  OMG.

Another example - Just the other day I had a fight on my hands.  I was working on an app that had previously been partially developed.  I needed to build a GUI around a certain table for maintenance.  But there was no unique identifier.  It had an ID field.  But all the rows were NULL.  I asked if it could be made to be an auto-number Identity like field.  No - that apparently is hard in Oracle.  Hard?  I told them Access can do that, how can it be hard?  Well, it just is.  OK.  So, finally they agreed to make it a varchar field so I can put in GUIDs that I'll create in my .NET code.  And, get this, they insisted that it be 50 chars wide “just in case Microsoft changes the width of the GUID in the future.“  That darn Microsoft - always screwing things up!

I've heard horror stories for a long time now, about dealing with DBAs.  But, I've always BEEN the DBA, so of course I laugh it off and think “no way it's that bad.“  But now I think I'm getting the picture.

So - can anyone shed some light?  Have I just seen three extreme examples in a row?  Or am I just spoiled by SQL Server?




Legacy Comments

Mike Swaim
re: Does Oracle Suck? Or just Oracle DBAs?
My background: I did SQL Server for 4 years, then Oracle for 5, and I've moved back to SQL Server for the past 2. (I started out with SQL Server running on OS/2.)
Stored Procedures to take up memory, but so does dynamic SQL, since it gets cached, too. I believe that they both get cached in the same place, so one's not much of an advantage over the other. The big downside of Oracle SPs is that they can't return result sets. On the other hand, PL/SQL's more powerful than Transact SQL. Also views in Oracle are pretty darn powerful. (Especially materialized views.)
Another nifty thing about Oracle is that is supports array parameters. You can have each parameter in your SQL be an array, and it'll execute the SQL over each index. This can be a big win if you're operating on a lot of rows, because it really cuts down on the network traffic, and your SQL only gets parsed once. (MS's .net provider doesn't support this, but Oracle's does.)
As for DBAs, I can see several things. Most Oracle DBAs are dedicated to keeping the server running. That's a LOT harder than with SQL Server. Most of the SQL Server DBAs that I've run into were developers who took on added work. So the Oracle DBAs probably aren't that much in tune with what's needed to improve performance from a client perspective.
Also Oracle's changed a lot in the past 5-6 years. Sure, SQL Server's changed from the 4.x days, but not nearly as much as Oracle has. (Stuff like query optimization's really different from Oracle 6.) It's possible that there was a major limitation in previous versions of Oracle that isn't there now.
But my guess is that the DBA problems you've experienced have been because the DBAs live in a different world than the developers.

Kevin Ryall
re: Does Oracle Suck? Or just Oracle DBAs?
Wow - I never even thought of those pesky Microsoft people changing the size of a GUID. I'm going to have to increase the size of all our ID fields next week just in case...

Eddie Awad
re: Does Oracle Suck? Or just Oracle DBAs?
Your post title "Does Oracle Suck? Or just Oracle DBAs?" leaves the reader with the impression that either Oracle sucks or Oracle DBAs suck. Based on that, it has to be one or the other, which is not true because neither is correct.

The fact that when you said "I've had my first experiences with Oracle" does not give anything you say about Oracle (as an RDBMS) any credibility. I understood from your post that you have been a "SQL server" guy for a while, which means that I, as a reader of your post, am more likely to find your statements about SQL server worth reading and credible as they come from an experienced person.

I can say with some degree of certainty that *some* Oracle DBAs suck. I am also sure that some SQL server DBAs, or some DB2 DBAs, or some X DBAs suck as well, but the generalization that (all) Oracle DBAs suck, is not a true statement. There are a lot of fine DBAs out there whom I'm sure you have never met.

I'm sorry that you have been exposed to such horror stories, but that's part of the job I guess. I always blame it on the ignorance of the people working with the tool and not on the tool itself.

One additional note, Mike Swaim in his comment above wrote: "The big downside of Oracle SPs is that they can't return result sets". What about REF CURSOR types Mike?


rockmoose / Claes Welander
re: Does Oracle Suck? Or just Oracle DBAs?
...actually a more complex support than SQL Server supporting natural joins...

That is the #1 thing I lack in SQL Server !

Entertaining blog though, enjoyed reading it.

re: Does Oracle Suck? Or just Oracle DBAs?
FYI you can create a sequence linked to a trigger and then it works like an auto-number

done both
re: Does Oracle Suck? Or just Oracle DBAs?
You were obviously dealing with some fairly inept Oracle DBAs. I've used Oracle 7.3 - 9i and have for the past couple of years have been using sql server 2000. The stories I would tell would be almost the exact opposite of your own.

What do you mean there is no exception handling? I've got to check @@error all over the place and some best practices recommend the use of goto statements?

What do you mean a read causes a lock that might block or deadlock a write?

So you're saying there are no packages in SQL Server? Oh, there's no means to overload a sproc I have to actually name them differently?

Oh, but Yukon is coming. Oh great it sounds like it might have everything 8i did.

Just thought it might be fair to tell both sides ; }

re: Does Oracle Suck? Or just Oracle DBAs?
You were defintily dealing with 3 straight DBA's who had severe cases of cranial rectial inversion. procedures definitly have some performance benefits on oracle 8/9.

I have no idea what they were talking about with 'autonumber' fields being hard to do. It's 7 lines of code tops. Most of those are due to the verbosity of PL/SQL.

basicly it looks like this:

Create Sequence TableName_IDs;

Create or replace Trigger TableName_ID_assign
before insert on TableName for each row
-- dual is a dummy table in oracle
Select TableName_IDs.NextVal into :new.ID from dual;

It looks overly complex for just an autonumber field untill you realize that you should probably be using procedures anyway. Doing it like this allows you to write Create procedures which return the ID of the Item they've created.

as such:
Create Procedure TableName_C( p_ID OUT TableName.ID%TYPE ...) IS
v_NewID TableName.ID%TYPE;
Select TableName_IDs.NextVal into v_NewID from dual;
Insert Into TableName (ID ...) values (v_NewID ...);
p_ID = v_NewID;
END TableName_C;

re: Does Oracle Suck? Or just Oracle DBAs?
Are you really coming to the conclusion that either Oracle or all of it's DBA's suck because you have had 3 bad experiences?

I can tell you that you that about half the information you find out there for SQL Server is wrong. The whole MS camp pretty much says to use stored procedures because of their speed advantages-- but SQL Server query optimizer fails in many situations when it has to choose one plan to run for all values being passed into it.

A good example is a stored procedure making a query against a partitioned view. If you're input parameter is the constraint that chooses the underlying table, then the stored procedure's exec plan will use all the underlying tables because it is not smart enough to actually choose the one correct underlying table during execution.

I don't know altogether that much about Oracle. All I know is that I have been using SQL Server for way too long, and I could not imagine any other DB having so many problems.

Damien Jorgensen
re: Does Oracle Suck? Or just Oracle DBAs?
I'm sticking with IBM DB2!


re: Does Oracle Suck? Or just Oracle DBAs?
I have a hard time with Oracle as well. But it may be because I don't have the level of experience with it as I do with SQL Server. However, I have found that most Oracle DBA's I have worked with do suck. They seem obsessed with proving they are superior to anything Microsoft. It really gets in the way sometimes. Maybe they feel threatened.

re: Does Oracle Suck? Or just Oracle DBAs?
Mate you have the DBA's from hell. They have not updated them selves they still think what was true for Oracle 5 is true for oracle 10i!
May folklores still present, like optimise for high data cache hit rate or table scans are BAD and indexes are GOOD. I still here these from both ORACLE and SQL SERVER 'experts', I just shut my mouth and smile.

Rich G
re: Does Oracle Suck? Or just Oracle DBAs?
I don't have much to add, except that after working with 8i and SQL server 7 & 2000 together for a couple of years I generally equate Oracle Views with SQL Server Stored Procedures.

Ref Cursors are a pain in the arse, it is a source of continuing annoyance to me that Oracle can't just dump a recordset without me spending all day messing with cursors, this isn't a solution, it is a waste of my time.

re: Does Oracle Suck? Or just Oracle DBAs?

Please dude, you're just making me cringe! "Only seven lines of code for ID column"! Help us all!

SEVEN LINES!!!!! Programatically. In ACCESS (yes access, forget MSSQL,Sybase, DB2) you can create a table with an ID type. But lo and behold, we just need 7 lines of code in Oracle, per table. F@#$@#$ great.

I hate Oracle.

re: Does Oracle Suck? Or just Oracle DBAs?
IF seven lines of code is too much to ask, maybe renting beach umbrellas is a job more your speed, Rudi.

There is far more power in having the sequence generation outside the column definition, but you'd forego that power to save you a few lines of code.

maybe @@identity is better now, but if you insert records into 8 tables how do I get the identity of the first through seventh table? Declare variables and store @@identity after each insert. Jebus help me! Seven lines of Farging code! I have to write CODE to do that. My God how does Microsoft turn a profit?!?

the last time I tried to restart an ID field was a nightmare. I had to copy records to a new table and then back. Maybe that's fixed too.

What if I wanted to use the same sequence between two or more tables? what if I wanted to use two seperate sequences for the same table? I want one system to add ID's with even numbers and another system to add ID's with odd numbers. I can do that with 2 sequences.

yes, you save 7 lines of code but you give up flexibility and power. If you're the kind of programmer who likes frameworks, who likes decisions made for you, who likes to have the guts hidden so you don't have to know a thing about your language, Oracle isn't for you.

re: Does Oracle Suck? Or just Oracle DBAs?

I have found this page from google n wanted to type some of my opinions. I am a security expert (Penetration Tester). MSSQL is a peace of shit if the subject is security. But I love it, I love it so much! :) Cuz people use MSSQL and I make money.

Oracle is a peace of shit too. I can't limit recordsets easily for huge tables. When I use nested queries to limit the recordset for huge tables (eg: 10 million recs), I get query timeout errors (If there is no IDENTITY field).

Rudi is right.
Yes, "SEVEN LINES" is enough to stop programmer to define IDENTITY field.

But it also stops hackers to steal all datas ;)

Have a great time.

re: Does Oracle Suck? Or just Oracle DBAs?
I really enjoyed this blog.. but I'm so surprised to read yours opinions on Oracle. I'm a new Oracle DBA, working on MSSQL and MySQL too: I've installed and run Oracle on a huge number of server (Centos, Red Hat) without any problem... sure if the DBA can't create a decent ID column in a table, I'm sorry but I can't call him DBA. I grow with earlier release of MySQL and I always use some kind of Primary key...
So I keep smiling reading your blogs...
Bye bye

re: Does Oracle Suck? Or just Oracle DBAs?
In my experience Oracle sucking is a combination of both Oracle DBA's and Oracle. I am very suprised that Oracle hands out certifications so easily to people. However, in the right hands, Oracle works pretty well based on what your idea of 'working well' really is. Nothing is perfect but each and every year I am more and more confused as to why Oracle costs as much as it does and why companies continue to bend over to it. It certianly isn't worth the price you pay for it these days. But I have yet to find more than 2 Oracle DBA's that impress me with their knowledge on all aspects of Oracle. (and I'm talking about a good 30+ Oracle Certified DBA's that I know personally) To me, most of them don't really care how things work or whats wrong. As long as a paycheck keeps coming in, thats all that matters to most of them. (but what else is new in the world right?)

Developers Suck
re: Does Oracle Suck? Or just Oracle DBAs?
Funny, as a DBA I find many developers that suck.
No database product can make up for a piss poor developer.

re: Does Oracle Suck? Or just Oracle DBAs?
How about just DBA's in general. We've used both platforms in the past and just hired a DBA with years of experience (I'm still wondering how much of this experience was fabricated). He's deleted proxy users without notice (breaking every program using them), removed indexes, re-indexed on the wrong indices, added incorrect referential integrity rules in and muddled the server settings so badly that connectivity is hit and miss (he's gotten it to the point that two many connections will shut everyone out). I am left to deal with the mess, without sa privledges no doubt! So, without the ability to make the changes, _I_ have to do the research to figure out the problems, let him fix them and then take credit for what he screwed up.

Of course, he blames the server... it can't argue back.

re: Does Oracle Suck? Or just Oracle DBAs?
The funny thing with Oracle 9i is that it installs at least three different JRE version. It does tell us something about a big company where developers apparently have a communication problem. Or maybe it tells us something about java not living up to it's promises (but that's another discussion..)

Trinh Ba Tung
re: Does Oracle Suck? Or just Oracle DBAs?
I think Oracle corp. or SAP or Peoplesoft or any big corporation are just piece of shit at software development. I wish I could somehow force the law markers to limit the product development budget under US$50,000 to develop any of their products, so could see much better products on the market and watching those monsters dying ... Haha

Chutz Ponderosa
re: Does Oracle Suck? Or just Oracle DBAs?
Yea verily it doth suck most mightily!

Long live MySQL!


re: Does Oracle Suck? Or just Oracle DBAs?
Well i use both SQL Server and Oracle and finds SQL server easier to manage than oracle. Anyway I am just about one papper away to be an OCP but still enjoys SQL Server thant oracle. Oracle keeps on coming up with new versions almost every year and I just don't understand why all those new versions if there is really little different between them. Just a patch will do.

re: Does Oracle Suck? Or just Oracle DBAs?
You're just about to become an OCP? Yet you've never looked at the differences between versions. Have you ever looked at the new features documentation. Have you read about the improvements to the LRU algorithms (do you know what an LRU is!) What about the addition of analytical functions, the introduction of the cost based optimiser. ASM, ASSM, LMTs, OMF. Jeez you are clearly going to be nothing more than a paper OCP and exactly the kind of DBA that people complain about.
As for the main Topic, Oracle has it's faults under certain circumstances, as does any rdbms. Oracle is also far superior to many rdbms under many circumstances (concurrency levels, reads not blocking writes, data consistency mechanisms to but a very very few). To condemn a product because 'you can't have an autonumber' or 'it takes 7 lines of code' is pathetic.

re: Does Oracle Suck? Or just Oracle DBAs?
As a developer for 30 years and a DBA for both SQL Server and Oracle, each for over 5 years...

1) Oracle is labor intensive to administer, on purpose, I have had Oracle employees tell me so. Why? So the DBAs don't revolt over not having so much to do, and possibly losing their jobs. Administration of SQL Server is friendly, Orcale administration is cryptic command line BS that maintains the mystique of Oracle DBAs.

2) A database should maintain data integrity regarless of how it is accessed and abused, either intentionally or unintentionally, which means using stored procedures to maintain logical (if no referential integrity)...a database should never rely on an application or programmer to do the right thing, it should be enforced by code at the DB level. I have developed numerous models in both Oracle and SQL server that may have no direct table access, only SP access to enforce this. Its easier in SQL Server.

3) Some cliques of Oracle DBAs are helpful (I won't be mentioning company names, I have worked for a dozen Fortune 500 companies as an employee and as a consultant)...and other cliques of DBAs are completly worthless, obstructive, focused only on narrow objective like tranfser ease to the warehouse from transactional or operational databases above all other considerations, often to the detriment of all other having indexes on things that are queried frequently. Arrgh. Other DBA groups are so tunnel visioned by trying to keep a massive database running (often because they have made poor decisions between where the lines are between transactional, operational and warehouse databases) that they are spending 100% of the time keeping it alive and can't do anything else. And sometimes Oracle DBA are aholes.

All in all SQL Server is easier to administer, use as a developer, and it does BIG and has for a while now. Oh and its cheaper, out of the box and over time, because you don't need an army of wonk DBAs to keep its heart beating.

Avoid all other databases in a corporate environment, like MySQL which is a joke on so many levels, and will create more grief than either SQL Server or Oracle in the long run.