Thursday, January 31, 2008

Love Your DBA

I consider myself a Developer/DBA.

That said, you've probably either read about or experienced the typical riff between the developer and the DBA.

At my current employer, I am finally surrounded by true Production DBAs. Initially, I found it difficult to work with them. When I would ask "Why can't I do that?" I would rarely get a response.

Over time though, things have changed...for the better.

I believe it's called trust.

Trust that I am trying to do the right thing.
Trust that I want to learn.
Trust that I will listen to their suggestions.
Trust that I won't hack their DEV/QA instances using CREATE ANY PROCEDURE and EXECUTE ANY PROCEDURE.
Trust that I want to build a scalable and robust application.

So love your DBA. Give them time to get to know you. Give them time to learn your style, your methodology. Maybe someday they'll love you back and your job will get infinitely easier.

Sunday, January 27, 2008

Open Source Obsession?

Since our new CIO came on board last January, there seems to a big movement towards Open Source tools.

While I have nothing against them, I've used various tools in the past; I just don't see what our obsession is with them.

Let's start with Ruby on Rails. An open source framework built on top of Ruby. It's used for web development. It's supposed to be a much more user intuitive language which makes it so easy. Fair enough. I'm always for something that will make my job easier. Our corporate website and provider portals were previously created on the dot net framework.

It was decided last year to replace our entire web infrastructure with Ruby on Rails. I'm still trying to figure out why. It's not that I am a pro-Microsoft guy, but the site worked. There were complaints about it missing this or that functionality, but that's fairly easy to remedy. As far as I know, dot net can support AJAX functionality (which I believe was at the heart of everything).

The demos of the new site were very cool (apparently we paid someone a lot of money to design the site...a LOT of money). It looked all web 2.0ey, big buttons, small text (which is a suprise given we are an HMO managing Medicare). It looked a lot like the 37signals applications in fact. I guess I've read Tom Kyte for far too long and his rant about putting business logic in the database because the front end will always change. Seems true. Java or dot net were all the rage a few years back, now it's Ruby, in a couple of years it will be something else (ApEx!) at which point we will have to rewrite the whole thing.

Next up, MySQL. It's a given that this database has come a long way. Version 5 even has stored procedures. It's a great free database that supports many websites out there. Free is good. Well, mostly free anyway, we do pay support costs right now. Almost every new project is built on top of MySQL. Why? I'm not sure other than free.

I asked the question to the CIO in one of our All-Hands meetings and his response was cost.

Fair enough, Oracle is expensive. The way we use Oracle is even more so. Each project seems to get it's own database. Why they don't get a schema on an existing database I don't quite understand. I've been told that it is a logistical nightmare to pull down a database that affects so many different applications. Each group wants their own version, etc., etc.

I can understand the Data Warehouse having their own database and perhaps our main appplication having it's own database; but every single application? Why not a one off database that houses all the smaller applications in different schemas? That's what Oracle was built for? Plus you can reuse code, reduce the number of instances (thus reducing the cost)...I just don't understand.

I believe my main complaint is that they are still just treating the database (whether Oracle or MySQL) like a bucket. Web people should not be writing SQL; Ruby people should not be writing SQL; just like I shouldn't be writing Ruby code. I don't know it.

I would be willing to bet that I could re-create many of our smaller applications in a much shorter period of time in Oracle and ApEx given the same requirements.

So I rant on. If I truly thought that this was an effort to make IT cheaper and more sustainable, I would be on board. I just don't see that that is the case...

Saturday, January 26, 2008

Corporate LIfe (Continued)

The rumors were true, our top three executives resigned on Friday. I have a tendency to believe in the best of people so I sure hope this is their idea of taking one for the team.

If you're interested you can read more about it here, here, and here.

As prodlife mentioned in her comments from my previous post, layoffs are something (thankfully) I haven't had to endure. But it may come after the possible acquisition.

I don't think I'm too worried, jobs seem fairly easy to come by. I'd just like some stability for awhile.

Wednesday, January 23, 2008

Corporate Life

One of the biggest reasons we decided to move down to Tampa (November 2006) was so that I can work in a "real" corporate environment (i.e. more than a few hundred people). WellCare has about 3,000 employees, IT makes up about 250.

It feels like I've experienced about every event I could have imagined:
1. In January of 2007, a new CIO/SVP was hired and promptly restructured (replaced the VPs) the IT department.
2. In October of 2007, we had a nifty FBI raid.
3. January of 2008, we appear to be losing our CEO, CFO and General Counsel.

Now I just need to wait for the merger/acquisition and I will have experienced just about everything!

Tuesday, January 15, 2008

Asynchronous Distributed HotLog - CDC Part IV

Part I, II and III.

For the time being I am throwing in the towel. I managed to patch my version up to thinking that might help, but it did not.

I'm still leaning to something on the side, the only reason being is that in the trace file generated by the 10g instance, I see a "Alter9iSource" line in there...but there is nothing in the alert log on the 9i instance.

So I'm packing it up for a little while, hopefully the time away will do me some good and help me regain focus.

I did find a great example of the manual setup by Lewis Cunningham; that may be the route in the future, just a bit more work to maintain.

Tuesday, January 8, 2008

Asynchronous Distributed HotLog - CDC Part III

This is the third installment (one and two)of my attempts to configure Oracle's CDC from a source (highest release for windows) to a (ditto) target.

After being appropriately set up with privileges (DBA's trusted me with the DBA role!) on our actual environments, source and target (Sun Solaris), I've moved back to trying to just get a simple proof of concept working on my machine.

That's had it's own difficulties, though I can safely say that I can manually create 9i and 10g databases manually.

Getting the databases configured properly has been my biggest challenge. I had eliminated most possibilities down to either Net Services or something to do with the JVM. I used my local listener and ruled out Net Services. It was down to the JVM. I kept getting this strange error:

ERROR at line 1:
ORA-00600: internal error code, arguments: [qccsrc_createHLSource-3], [], [],
[], [], [], [], []
ORA-06512: at "SYS.DBMS_CDC_IPUBLISH", line 133
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_CDC_PUBLISH", line 226
ORA-06512: at line 2
A trace file was generated (with the above error) but it didn't really tell me anything. I googled the phrase, nothing. I went to Metalink, nothing. It looked like a Java call though, so I tore the database down and rebuilt everything. Just in case, I added XDB, Data Mining and InterMedia in case there was some reference there.

Installing InterMedia was a pain. I kept getting a failure of a particular jar (ORA-23542?), could not resolve the class.

I googled one of the classes that failed to see if anyone had run across this before. There was only one record found...and it was mine from about a year and half ago! I found that very amusing.

So I went into the \ord\im directory and found a readme.txt. As I am scanning through it I see CLASSPATH. So I add the environment variable and voila! Perfect install. That would have solved my problem from before too. I followed the docs on the install to a T. Nothing in there about CLASSPATH. Perhaps I should write them and ask for it to be added?

Anyway, thinking the best, since I had a perfectly clean installation, I tried again:

2 dbms_cdc_publish.create_hotlog_change_source
3 ( change_source_name => 'T',
4 description => 'Test',
5 source_database => 'ORANINE' );
6 END;
7 /
And I waited for an agonizing minute thinking I had it this time...

ERROR at line 1:
ORA-01426: numeric overflow
ORA-06512: at "SYS.DBMS_CDC_IPUBLISH", line 133
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_CDC_PUBLISH", line 226
ORA-06512: at line 2

At least the ORA-0600 is gone, but I am back to where I started.

Another good thing is that I am really learning how to pour through trace files and tkprof files.

All the examples I have found make it seem so easy...why can't I get this dang thing to work?!

Thursday, January 3, 2008

Asynchronous Distributed HotLog - CDC Part II

In my first installment, I talked about my task to configure CDC.

I've set up both the source and target databases as detailed in the documents.

I create a simple table:


From the target database I issue the following:

( change_source_name => 'T_CHANGE',
description => 'Test',
source_database => 'CDC_APP' );

and shortly thereafter receive the following error:

ERROR at line 1:
ORA-01426: numeric overflow
ORA-06512: at "SYS.DBMS_CDC_IPUBLISH", line 133
ORA-06512: at line 1
ORA-06512: at "SYS.DBMS_CDC_PUBLISH", line 226
ORA-06512: at line 2

Elapsed: 00:00:57.23

So I set up tracing and I find the following in the trace file:

PARSING IN CURSOR #13 len=52 dep=0 uid=12 oct=47 lid=12 tim=342736069442 hv=1029988163 ad='3414b300'
PARSE #13:c=0,e=54,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=342736069435
BINDS #13:
oacdty=123 mxl=4000(4000) mxlc=00 mal=00 scl=00 pre=00
oacflg=00 fl2=1000000 frm=00 csi=00 siz=4000 off=0
kxsbbbfp=08460bd8 bln=4000 avl=00 flg=15
oacdty=02 mxl=22(22) mxlc=00 mal=00 scl=00 pre=00
oacflg=01 fl2=1000000 frm=00 csi=00 siz=24 off=0
kxsbbbfp=0844cf58 bln=22 avl=22 flg=05
An invalid number has been seen.Memory contents are :

The way I read that is "###" is being passed to dbms_output.get_lines where it should be expecting a number.

Again, the source database is and the target is I uninstalled the JVM because I thought that the wrong version of java was used to load it (not that I can find any reference to it being used). Changed my path, set up an ORACLE_HOME environment variable (yes, windows XP).

I'm hoping I just mangled the configuration of my local database. Tomorrow one of the DBAs is going to walk me through this in either our DEV or TEST environments (as it should be).