Connecting to a remote Oracle DB

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 :frowning: 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/

···

On Tue, 18 Jan 2005 19:31:05 +0900, George Moschovitis <george.moschovitis@gmail.com> wrote:

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 :frowning: Any ideas?

thanks in advance,
George Moschovitis

Failing that,
you should be able to put a full tns connection descriptor in there.

Thank you,

this solved my problem!

regards,
George

Failing that,
you should be able to put a full tns connection descriptor in there.

Thank you,

this solved my problem!

regards,
George

···

--
Nitro + Og: http://www.rubyforge.org/projects/nitro