please help !

P

Pradeepta Swain

I have installed dbi,oci8,ruby 1.8.6 ,oracle client 9.2 on XP machine
I have tried to connect a remote database using the code

dbh = DBI.connect('DBI:OCI8:ORCL','ftdam','ftdam')

where ORCL is the configuration file tnsnames.ora file.
but I am unable to connect .It is giving error like :

OCI Library Initialization Error

I can connect to the databse using same username ,password and
host string 'ORCL 'in sqlplus .but can't through ruby program ,Anybody
help !!!
 
A

Axel Etzold

-------- Original-Nachricht --------
Datum: Fri, 28 Dec 2007 21:15:51 +0900
Von: Pradeepta Swain <[email protected]>
An: (e-mail address removed)
Betreff: please help !
I have installed dbi,oci8,ruby 1.8.6 ,oracle client 9.2 on XP machine
I have tried to connect a remote database using the code

dbh = DBI.connect('DBI:OCI8:ORCL','ftdam','ftdam')

Dear Pradeepta,

please be more specific in your email headers - you'll
get more replies from people who are actually
competent for your problem :)

From your error message, there appears to be a problem about the file
oci8lib.so (see here:

http://ruby-oci8.rubyforge.org/svn/tags/ruby-oci8-1.0.0-rc2/NEWS )

This article:

http://wiki.rubyonrails.com/rails/pages/HowtoConnectToOracle

describes a way to connect to Oracle from Ruby on Rails
( you don't seem to be using it, but nevertheless), so
assuming that you did everything right as described there and
things don't work nevertheless, I'd suggest you try out
using ‘oracle’ rather than ‘oci’ as an adapter, which is supposed
to be newer, as described here:

http://blog.andrewbeacock.com/2007/06/how-to-change-your-rails-database.html

Best regards,

Axel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top