Re: Connecting to oracle (via JDBC) from unix through a firewall

From: <>
Date: Sun, 15 Jun 2008 07:37:51 +0200
Message-ID: <>

On Sat, 14 Jun 2008 20:42:30 -0700 (PDT), geoffeg <> wrote:

>I am trying to access my employer's Oracle server through a Java
>application (using JDBC thin). "I originally tried ssh -L
>1521:$serverIP$:1521 user@$employerShellServer$" but I quickly
>discovered that Oracle tries to make a second connection back to the
>client via a random port. I've looked at previous threads on this
>newsgroup on how to fix this problem but many of them refer to Oracle
>Metalink (which I don't have an account for) or specify adding
>registry keys (which won't work in linux/OS X).
>I've also tried changing my JDBC url to specify SERVER=DEDICATED
>(example below) but I only get the same error (IO Exception: The
>Network Adapter could not establish the connection).
>Is there some way (hopefully via the JDBC url) I can tell oracle to
>connect back through the incoming port (1521) or some utility I can
>install on my employer's shell server to act an as oracle proxy?

The solutions I posted many times are, in order of preference:

  • set up Oracle Connection Manager on the database server. Connection Manager isn't installed automatically, you'll need a custom install
  • set up shared server on the database, using a fixed port
  • set up use_shared_sockets=true in sqlnet.ora on the database server. This will affect all clients, and all clients will be shut down, when you shut the listener.


Sybrand Bakker
Senior Oracle DBA
Received on Sun Jun 15 2008 - 00:37:51 CDT

Original text of this message