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-

$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

generating all possible random letters
hi'

how can i randomize the letters a,b,c,d,e all possible ways, and i want to print the res

mysql select with $_get ?
Hi, i have this code:
Code: // If char id is 0 and character dont exist do:
if ($_GET["id

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

How to use php and sql to check if values match the ones in a table (for logins)
How would I code it that the script takes two variables that are passed to it (UserID and PIN), and

Search with relational database
Hey,

I have quite a complicated (for me anyway ) relational database for an apartments syste

Timer control causing error
I recently decided to add a timer control to an existing page that uses AJAX on my site. As soon as

need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working ca

How to convert this array to string
I am having problems converting this array to a string
using print_r($val[1]); I get:
Code: [

How to return to a previous page after running a PHP script
I'm having a bit of a melt down here because I think this should be really easy but can't work it ou

Table sorting
Hi,

I'm trying to modify the following in order to make the output table sorted alphabeticall

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