Setup unixODBC on Linux for Oracle and Sybase

I have been working this week on configuring a Linux server to connect to Oracle and Sybase using unixODBC to be used by a System running on PHP.

So, I thought of sharing my /etc/odbc.ini and /etc/odbcinst.ini since I had a bit of hard time writing them. It may help someone who is trying to figure out how to connect using ODBC on Linux.

Packages Required on CentOS

httpd php unixODBC

Manually Install Oracle Instant Client 11.1 RPM Packages and Install Sybase ASE from the TGZ File.

For Oracle you need to copy all the libs to /usr/lib

cp /usr/lib/oracle/11.1/client/lib /usr/lib/

/usr/lib/oracle/11.1/client/lib

/etc/odbcinst.ini Contents:

[Oracle]
Description     = Oracle ODBC Connection
Driver          = /usr/lib/oracle/11.1/client/lib/libsqora.so.11.1
Setup           =
FileUsage =
CPTimeout =
CPReuse         =

[Sybase]
Description = Sybase ODBC Driver
Driver = /opt/sybase/DataAccess/ODBC/lib/libsybdrvodb.so
FileUsage = -1

/etc/odbc.ini Contents:

[Oracle]
Application Attributes = T
Attributes = W
BatchAutocommitMode = IfAllSuccessful
CloseCursor = F
DisableDPM = F
DisableMTS = T
Driver = Oracle
EXECSchemaOpt =
EXECSyntax = T
Failover = T
FailoverDelay = 10
FailoverRetryCount = 10
FetchBufferSize = 64000
ForceWCHAR = F
Lobs = T
Longs = T
MetadataIdDefault = F
QueryTimeout = T
ResultSets = T
ServerName = //serverip:port/dbname
SQLGetData extensions = F
Translation DLL =
Translation Option = 0
UserID =

[Sybase]
Driver = Sybase
Server = serverip
Port = serverport
Database = dbname

PHP Script to Test ODBC Connectivity:

<?php

$query = “select * from table_name”;

$conn = odbc_pconnect(“DSN”, “username”, “password”);

if(!$conn) die(“Connection failed”);

if($result = odbc_exec($conn, $query)) {

echo “Query returned : ” . odbc_num_rows($result) . “rows”;

odbc_result_all($result);

}

?>

  • Share/Bookmark

Post using my Storm with wordpress client

This is a post using my storm. Now I can blog at anytime.

  • Share/Bookmark

DynoStorm Results for my VW R32

I was really disappointed with my DynoStorm Restults. I will do another run with nothing inside the car, since I had lots of stuff in the car and a friend.

Car: VW Golf MKV R32 – 2009
Mods:

  • Milltek Exhaust with Magna Flow Resonator  (I will take off this resonator and put back the Milltek Non Res Pipe and have another run).
  • VF Engineering Air Intake

Below is my results:

0-100KPH 6.91 Sec
1/4 Mi : 14.54 Sec @ 166.6 KPH

Peak Power: 180 HP ~ Wheel Power ~ Since no drive train loss was entered.
Dyno Storm Graph

  • Share/Bookmark

Attempt to fix the Storm screen click

I have tried to loosen the screws a bit, and it worked. However, I have to do some tweaking now.. Try to adjust until I get my perfect setting!

  • Share/Bookmark

Purchased DynoStorm

Today I purchased DynoStorm, I will post some graphs of my car hopefully tonight!

DynoStorm: http://www.bunsentech.com/projects/dynostorm/

  • Share/Bookmark

I got my storm from repairs..

I got my storm from repairs.. Yet the screen doesn’t click well!! I think I will try losing the screws as suggested here: http://blackberrystorm.wikidot.com/screen-click-problem-fixed

  • Share/Bookmark

Arabic Fonts for Blackberry OS >= 4.5

I finally have done it, I have been resisting to do an OTA package for arabic support for a long time, but now, when I started getting lots of Blackberries from my friends that doesn’t have arabic support and they wanted arabic support (Reading only)… I thought it would be easier for me to give them a link to download the arabic fonts directly to their BB’s.. So, here is the link for everyone: http://www.almahdi.cc/bb/arabic.jad

  • Share/Bookmark

WordPress Themes