[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Connecting to a remote Oracle DB

George Moschovitis

1/18/2005 10:28:00 AM

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

3 Answers

Jason Sweat

1/18/2005 12:01:00 PM

0

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 :( 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...


George Moschovitis

1/18/2005 12:56:00 PM

0

> 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/proj...

George Moschovitis

1/18/2005 12:57:00 PM

0

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

this solved my problem!

regards,
George