Author Archive

Tips for using a custom installed unixODBC version

Thursday, September 10th, 2009

Don’t forget to link with the new header files (sql.h), instead of the default system  installed version. Do this using “-I/usr/local/include” or whatever the new path is. You should also add “-L/usr/local/lib” to link with the new libraries.

Just be careful because there are now two versions of the same libraries installed, so strange issues could crop up if software compiled with the headers from one version uses the library from the other version (usually segfaults in the library with code that should run correctly).

Oracle 11g R2 on 64bit Linux

Tuesday, September 8th, 2009

Oracle 11g R2 fixes the linking issues at installation time that I encountered with the first release. The installation went very smoothly this time around.

table and column name case sensitivity

Friday, July 17th, 2009

I ran into some issues accessing Oracle tables via ODBC. It turns out that sqlplus automatically uppercases all the table and column names when you create a table. The table can be accessed fine with sqlplus which transparently handles everything in uppercase. However, unixODBC is case sensitive by default. So I just have to be aware of the difference and specify everything in uppercase.

You can quote the table name in Oracle to prevent this behaviour, but it is not recommended.

After investigating some more, it turns out that each databases handles it differently.

MySQL is case sensitive on Linux:

PostgreSQL lowercases table and column names:

ORA-01017: invalid username/password; logon denied

Thursday, July 16th, 2009

I’ve been testing unixODBC with MySQL and PostgresSQL and recently tried using it with Oracle 11g. After getting everything setup I kept getting the following error

28000:1:1017:[unixODBC][Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied

I finally discovered that this is because Oracle uses “UserID” instead of “User” in the ODBC configuration of the DSN.

Using unixODBC with Oracle 11g on Ubuntu 9.04

Wednesday, July 15th, 2009

The current version of unixODBC (odbcinst1debian1 2.2.11-16build3) does not work with Oracle 11g on Ubuntu. When correctly setup it gives the following error (‘isql -v oracledb’):

isql: symbol lookup error: /opt/oracle/product/11.1.0/db_1/lib/ undefined symbol: SQLGetPrivateProfileStringW

To fix this, you need to install a newer version of the unixodbc libraries. Until the updated packages are available for Ubuntu, the easiest way to fix it is to download unixODBC from and install it in /usr/local.

Extract the source archive:

tar zxvf unixODBC-2.2.14.tar.gz

cd unixODBC

By default, unixODBC will install into /usr/local which is what we want so that it doesn’t conflict with the existing packaged version. However, we also want it to use the config files in /etc instead of /usr/local/etc. Luckily, there is a configure option for this:

./configure –sysconfdir=/etc

Note that you need to install libqt4-dev in order to do the full build. However, you can use ‘–enable-gui=no’ if you don’t plan to use the gui (which is what I did).

sudo make install

Now it is compiled and installed. Make sure that /usr/local/lib is in your search path so that the dynamic linker picks up the new versions of the libraries. Since I had to add an entry for oracle anyway, I created a new file called /etc/  and inserted the following lines:



Save the file, and then run ‘sudo ldconfig’ to update the dynamic linker cache.

Now you should be good to go.

MicroATX Core i7 Computer

Thursday, June 18th, 2009

I recently upgraded my work computer and spent a lot of time selecting from the different options available to get a good value for my money. In the hopes that someone will find this useful, here are the components I selected and why. I bought my parts from Newegg and have provided direct product links.

Start with an excellent MicroATX Motherboard. DFI makes a high quality product and this is the best motherboard I have ever owned. Incredible amount of BIOS options.

DFI LanParty JR X58-T3H6 – $200

Next, select the fastest Intel processor at a reasonable price. Also overclockable if you’re into that.

Intel Core i7 920 Nehalem 2.66GHz Quad-Core Processor – $280

I actually bought 6GB OCZ DDR3 1333 Memory. However, it is out of stock.

Even though I bought a different brand, here are the things to consider. Find memory with the highest speed rating and lowest latency within your budget. I also like G.Skill brand. I wanted 6GB at around $100, but I also had limited clearance in my case so didn’t want heat spreaders. I chose DDR3 1333 with slightly better timings (7 7 7 18) over DDR3 1600 with average timings (9 9 9 24). There is also DDR3 1600 with better timings (8 8 8 21) but it has tall heat spreaders. I wanted to keep it slim. Keep in mind that often you will have to adjust BIOS settings to take advantage of faster ram.

G.SKILL 6GB (3 x 2GB) 240-Pin DDR3 SDRAM DDR3 1333 (PC3 10666) Triple Channel Kit – $95

Because I got a MicroATX motherboard, I went with a MicroATX case which is about half the heigh of a standard Mini-Tower case. You can get even smaller cases, but I wanted one with a 120mm rear exhaust fan to minimize the noise. There is also a bit more interior space than an even smaller case.

Make sure to pay attention to the size of the power supply. If you go too low it may not power your system reliably and will reduce the life of the power supply (and could cause random lockups or reboots). If you go too high then the power supply will be less efficient at lower wattages and you’ll be wasting electricity most of the time. The best thing to do is a rough calculation based on the max wattage of all the parts and go 10-20% higher.

APEVIA X-QPACK2-BK/500 MicroATX Computer Case 500W Power Supply – $100.

Depending on your case, you may have to be careful about the size of your video card. I also wanted dual-dvi output for two monitors at 1920×1080 and modest power draw. I went with a relatively slim single slot Radeon HD 4670. I also like the fan that exhausts the hot air out of the case.

HIS Hightech H467QT512P Radeon HD 4670 IceQ Turbo 512MB 128-bit GDDR3 PCI Express 2.0 x16 – $80

1.5TB Hard Drive. I chose the Seagate Barracuda, even though a lot of people online claim firmware issues with it. I haven’t had a single problem. You could get two of them and run them RAID 0 (striped) for performance or RAID 1 (mirrored) in case one fails.

Seagate Barracuda 7200.11 ST31500341AS 1.5TB 7200 RPM SATA 3.0Gb/s 3.5″ Internal Hard Drive (bare drive) – OEM – $120

Pick whatever DVD-RW drive is on sale with the features you want (dual-layer, LightScribe). I like LITE-ON or LG brand. I chose a black one because it matches the color of the case.

LG Black 2MB Cache SATA 22X DVD±R DVD Burner with LightScribe – OEM – $22

If you need a new monitor, you can get 23″ LCD’s for under $200. Make sure it has at least DVI input, and supports 1080P. Most of them are 1920×1200 which gives you a little more vertical space, but I chose one that supported true 1080P 1920×1080. I really like Samsung brand but it tends to be more expensive. Other good ones are ASUS, Acer, and Viewsonic. I got two 21.5″ LCD’s for dual-display, but most people only need one 23″.

ASUS VH236H Black 23″ 2ms(GTG) HDMI Widescreen LCD Monitor – $200

Total Price:  $900 without monitor or $1100 with monitor.

If you’re upgrading, you may be able to reuse the old hard drive, video card, dvd drive, or case (and power supply), depending on how old they are. If the parts are too old, it makes sense to buy new ones because the old parts could severly hurt the performance of the new machine.

If you want a beefier video card, you could upgrade that and go with a smaller hard drive or a smaller monitor.

You could also shave off around $200 by going with a  Core 2 Quad CPU and Motherboard instead of Core i7. You would also likely have to change the memory to DDR2 instead of DDR3. However, even though the Core i7 is only 4 cores, it has HyperThreading enabled which means it essentially runs like it has 8 cores. That would be good if you use VMware or run a lot of CPU intensive programs at once.