From: eddy.pagotto@... Date: 2008-02-21T18:59:57+09:00 Subject: Re: Confused about OCI8 OK, to summarize: 1. I have to install the full version of Oracle client 2. I have to add the service name to TNSNAMES.ORA 3. To test the connection I will use OCI8.new("", "", "") So, with Oracle 8 and 9, I cannot use the Instant client 10.x because I can only use the /// form only with 10g database. Is it all right? Thanks, Eddy On Feb 21, 10:12 am, KUBO Takehiro wrote: > Hi, > > On Thu, Feb 21, 2008 at 1:20 AM, wrote: > > With Ruby (version 1.8.6/Win32) I installed the OCI8, then I copied > > the necessary DLL libraries > > from a Oracle/bin directory (such as OCI.DLL) because I don't have the > > Oracle client on my machine, > > and the Instant client I can download from Oracle's site is the 11g > > version which doesn't support Oracle 8. > > Full client's OCI.DLL won't work if it is copied to outside the installed > directory. You need to install the Oracle client on your machine. > It may work by copying all files under ORACLE_HOME and all > registry keys under \\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE. > But I'm not sure that is all. > > > So, finally I tried some code. > > First an example from the Oracle's site: > > > ruby -r oci8 -e "OCI8.new('user', 'pwd10', '//10.0.0.22:1521/ > > TEST').exec('SELECT * FROM test_table > > WHERE rownum = 1') do |r| puts r.join(' | '); end" > > '//10.0.0.22:1521/TEST' is a new feature of Oracle 10g. > It won't work on older Oracle versions.