tags:

views:

1552

answers:

4

I'm trying this with Oracle SQL Developer and am on an Intel MacBook Pro. But I believe this same error happens with other clients. I can ping the server hosting the database fine so it appears not to be an actual network problem.

Also, I believe I'm filling in the connection info correctly. It's something like this:

host = foo1.com
port = 1530
server = DEDICATED
service_name = FOO
type = session
method = basic
+1  A: 

That's the message you get when you don't have the right connection parameters. The SID, in particular, tends to trip up newcomers.

Hank Gay
+1  A: 

If you want to connect to database on other host then you need to know

  • hostname
  • port number (by default 1521)
  • SID name

if you get the connection error that you mentioned in your question then you have not specified correctly either hostname or port number. Try

telnet hostname portnumber

from Terminal to verify if you can connect to portnumber (by default 1521) - if not then probably port number is incorrect.

Raimonds Simanovskis
A: 

Do you have a known-good JDBC connection string or similar?

Hank Gay
A: 

My problem turned out to be some kind of ACL problem. I needed to SSH tunnel in through a "blessed host". I put the following in my .ssh/config

Host=blessedhost
HostName=blessedhost.whatever.com
User=alice
Compression=yes
Protocol=2
LocalForward=2202 oraclemachine.whatever.com:1521

Host=foo
HostName=localhost
Port=2202
User=alice
Compression=yes
Protocol=2

(I don't think the second block is really necessary.) Then I change the host and port in the oracle connection info to localhost:2202.

dreeves