Tuesday, March 14, 2006

Some gotchas with Oracle XE

Oracle recently announced production/general availability of Oracle Express Edition (XE). Generally a very exciting development: a totally free, almost fully-functioned version of Oracle Database 10g that downloads and installs in minutes (well, assuming you've got broadband!).

I ran into a couple of glitches, however, that I thought I would share:

1. UTL_FILE is not available. Usually, when you install Oracle, the UTL_FILE package (used to read/write files within PL/SQL) is installed, EXECUTE is granted to PUBLIC, and a public synonym is created. With XE, the package is installed and the synonym created, but the GRANT EXECUTE has not been run.

To fix this problem, connect to a SYSDBA account and run the $ORACLE_HOME/RDBMS/Admin/utlfile.sql file, or simply execute this command (from a SYSDBA account):

GRANT EXECUTE on SYS.UTL_FILE TO PUBLIC
/

2. Oracle XE does not include a Java Runtime Environment. I have been using some Java classes, installed in the database, in my unit testing product, Qute. Here is an example of a call to this Java code:

PROCEDURE parse_package (
owner IN VARCHAR2
, package_name IN VARCHAR2
, program_name IN VARCHAR2
)
AS
LANGUAGE JAVA
name 'quPlSqlHdrParser.parsePackage(
java.lang.String, java.lang.String, java.lang.String)';


In pre-production versions of Oracle XE, the code compiled, but then raised runtime errors, sometimes ORA-00600, which are not trap-able with an exception section.

The production version still does not include a JRE and even worse, if you install the Oracle Database 10g Express Edition (Western European; " Oracle Database 10g Express (Western European) Edition - Single-byte LATIN1 database for Western European language storage, with the Database Homepage user interface in English only.") then the above code will not even compile. Very strange. Oracle seems to actually be looking at the literal string and attempting to validate it at compile time.

Yet if I install the
Oracle Database 10g Express Edition (Universal; Multi-byte Unicode database for all language deployment, with the Database Homepage user interface available in the following languages: Brazilian Portuguese, Chinese (Simplified and Traditional), English, French, German, Italian, Japanese, Korean and Spanish), then I do not get a compilation error.







Sunday, March 05, 2006

Ah, the good old days of high mileage vehicles....

I must admit, I am something of a Honda bigot. Maybe that's because back in 1971, in my second year of college in Rochseter, NY, my father gave me his bright orange Honda Civic. It was a tiny little bug car, light and durable, but certainly nothing fancy. I loved it! (my father is a big fellow, just over 6 feet tall and heavyset, so it is surprising to think that back then he would shift from his usual big sedans to a Civic, but that's the way he was/is - ready to try new things)

I now own a Honda Insight, the two-seater hybrid they released in 2000. Got mine in April 2000 and since then have averaged 49.8 MPG for some 46,000 miles. I love that car, too.

Got up this morning and somehow ended up going through the backroom in our basement, clearing out old stuff (and getting lungfuls of dust in the process) and came across a reminder of another Honda Civic I leased, and how far we haven't come in the last couple of decades.

Back in 1992, I left Oracle Corporation and become a consultant. Took a job working at McDonald's headquarters in Oak Brook -- and suddenly I was a commuter. So I looked around at my options and found the Civic VX. The VX was a Civic coupe with a VTEC engine adapted from the early Acura Integra.

It cost $10,550, which was considered fairly pricy for a little car back then, and boasted the following mileage:

Highway MPG: 55
City MPG: 48

Of course, I didn't hit those numbers, just like I only occasionally match the EPA MPG ratings for the Insight. But I clearly remember averaging MPGs in the 40s on the highway commutes I made to BurgerLand.

That was back in 1992-93!

So while I am glad to have my Insight (I really, really enjoy driving that car, even though its suspension is, shall we say, a bit brittle), I am also disappointed that the auto companies haven't come further in 14 years.