Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Attach a listener port to a specific database instance

171663May 31 2012 — edited Jun 1 2012
Hello,

I have two 11g databases in the same host, with service names db1 and db2.

The aim is to configure a listener, with two listening ports (1521 and 1522), but 1521 only attached to db1, and 1522 only attached to db2. That is, connections to 1522 port and service name db1 should be rejected, and so with connections to 1521 port and service name db2. The host has only a net interface.

I am unable to configure that properly. These are my settings:

In listener.ora:
LISTENER_DB1= (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST = <hostname>)(PORT = 1521)))
LISTENER_DB2= (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST = <hostname>)(PORT = 1522)))

In tnsnames.ora:
LISTENER_DB1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(Host=<hostname>)(Port = 1521)))
LISTENER_DB2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(Host=<hostname>)(Port = 1522)))

In instance db1, the local_listener parameter was modified:
SQL> alter system set local_listener='LISTENER_DB1';

In instance db2, the local_listener parameter was modified:
SQL> alter system set local_listener='LISTENER_DB2';


With this setup, connections to 1521 port and service name db1 are succesfull, as well as connections to 1522 and service name db2.

But connections to 1522 port and service name db1 are not rejected (indeed, they are successfull, and connect to the proper instance db1), as well as connections to 1521 port and service name db2.

Any comment will be wellcome.

Best regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 29 2012
Added on May 31 2012
23 comments
952 views