Not connecting to DB using ruby, error:env.c:257:in oci8lib.so: ORA-12154:


Posted on 16th Feb 2014 07:03 pm by admin

Hi All,

I am trying to connect to the database server from the client server using ruby and facing the following issue-

Did you know?Explore Trending and Topic pages for more stories like this.
$ruby -r oci8 -e "OCI8.new('temp','temp','//host:1521/sid').exec('select count(1) from rules'){|r| puts r.join}"

env.c:257:in oci8lib.so: ORA-12154: TNS:could not resolve the connect identifier specified (OCIError)
from /export/home/nikira/local//lib/ruby/site_ruby/1.8/oci8.rb:228:in `initialize'
from -e:1:in `new'
from -e:1
when i try the connection using simple sql command line, it's working fine

sqlplus 'temp/temp@tns_alias' --- connecting to the database.
I nerver used ruby, anyone please advice me on this?
Thanks
Abhinav
No comments posted yet

Your Answer:

Login to answer
231 Like 51 Dislike
Previous forums Next forums
Other forums

How to clone an SAP ECC using bacup tape on z/os?
We want to clone our production to a different SID using backup tape.

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

Change Web page language
i doing this thing first time but i dont find any suitable solution for it. On the demand of user. I

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

Table colours fail when extra row added
Hey Gurus,

I got a weird problem with formating the colour of a table made in php. Everything

pull content
I have an existing page, domain/adverts.php which has a good PR. I've just rebuilt my site and the n

Help on Order Entry Form/System Where is best to begin.
I have a dilema and a very short amount of time at this point and I'm looking for some help on decid

php form help
Hey,

I use a control file to set my meta tags and titles

Here's an example
Code: &a

Problems generating word documents on server side for security reasons
I have a problem with word documentation generation when generating a word document (docx) with PHP.

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash