Connecting to a remote Oracle DB

G

George Moschovitis

Hello everyone,

using the ruby Oracle driver I connect to a local db with the following
code:

conn = Oracle.new('username', 'passwd', '')

how can i connect to a remore to a remote database?

I have the ip and port (lets say 10.0.0.1 and 9999)

I tried Oracle.new('username', 'passwd', '10.0.0.1:9999') but this
doesnt work :( Any ideas?

thanks in advance,
George Moschovitis
 
J

Jason Sweat

Hello everyone,

using the ruby Oracle driver I connect to a local db with the following
code:

conn = Oracle.new('username', 'passwd', '')

how can i connect to a remore to a remote database?

I have the ip and port (lets say 10.0.0.1 and 9999)

I tried Oracle.new('username', 'passwd', '10.0.0.1:9999') but this
doesnt work :( Any ideas?

thanks in advance,
George Moschovitis

My initial guess is you should add the information to your systems
tnsnames.ora file and refer to it by a symbolic name. Failing that,
you should be able to put a full tns connection descriptor in there. I
am at home now, so I do not have the format handy, but you could
probably google for it.

Regards,
Jason
http://blog.casey-sweat.us/
 

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
474,164
Messages
2,570,898
Members
47,440
Latest member
YoungBorel

Latest Threads

Top