By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,602 Members | 1,457 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,602 IT Pros & Developers. It's quick & easy.

Multiple IP on Listener.ora & Tnsnames.ora

P: 2
Dear All,

I'm a new in Oracle DB. I'm using Windows 2000 as server and Windows XP as client. I installed Oracle Enterprise on server and Oracle 8.1 on clients.
I have some client with 2 different IP address, 172.16.xx.xx and 192.168.xxx.xx whices I want to connect to the server DB. How can I set the Listener.ora & Tnsnames.ora so all clients could connect to server. Right now I can connect just only one IP and the other IP is offline, but when I switch the host name on both file .ora to other IP, then I could connect the server as the IP on hostname in the Listener.ora and Tnsnames.ora.
Anyone could help me...?
Thanks in advance.

Best regards,


::Dwie::
Jan 23 '07 #1
Share this Question
Share on Google+
2 Replies


nico5038
Expert 2.5K+
P: 3,072
Hi Dwie,

Found this on the web:

If you really looking for proper syntax to configure Multiple IPs for listener.ora /tnsnames.ora for Same Oracle database.

1. I will use Oracle Net Manager to configure listener and tnsnames.ora on server first and use the server tnsnames.ora as a copy for all PC clients.This will avoid manual editting of configuration files which can mess up things.

$ORACLE_HOME/bin/netmgr

2. Or check the following configuration files which has similar setup you are looking. Its alway better to use netmgr for such tasks.

Hostname : prod1
IP address : 10.10.1.23
Oracle_SID : PROD1
ORACLE_HOME : /opt/oracle/product/9204

Hostname : prod2 (alias name of hostname prod1)
IP address : 100.15.100.22 (new ip address)
Oracle_sid : PROD1
ORACLE_HOME : /opt/oracle/product/9204


Present listener :

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.23)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = prod1.world)
(ORACLE_HOME = /opt/oracle/product/9204)
(SID_NAME = prod1)
)
)


Modified Listener and tnsnames.ora to handle New IP address for same database :

$cat listener.ora

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.23)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 100.15.100.22)(PORT = 1522))
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = prod1.world)
(ORACLE_HOME = /opt/oracle/product/9204)
(SID_NAME = prod1)
)
)


$cat tnsnames.ora

PROD1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.23)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 100.15.100.22)(PORT = 1522))
(CONNECT_DATA =
(SERVICE_NAME = PROD1)
)
)


Nic;o)
Jan 23 '07 #2

P: 2
Hi Nico...
Thanks for your reply...but I still can't connect with 2 IP address.
If you don't mind...I would like to chat with you on personal line first...and then, the finally we can broadcast again our conversation to this forum...how is that?
Thanks a lot.


Regards,

::Dwie::


Hi Dwie,

Found this on the web:

If you really looking for proper syntax to configure Multiple IPs for listener.ora /tnsnames.ora for Same Oracle database.

1. I will use Oracle Net Manager to configure listener and tnsnames.ora on server first and use the server tnsnames.ora as a copy for all PC clients.This will avoid manual editting of configuration files which can mess up things.

$ORACLE_HOME/bin/netmgr

2. Or check the following configuration files which has similar setup you are looking. Its alway better to use netmgr for such tasks.

Hostname : prod1
IP address : 10.10.1.23
Oracle_SID : PROD1
ORACLE_HOME : /opt/oracle/product/9204

Hostname : prod2 (alias name of hostname prod1)
IP address : 100.15.100.22 (new ip address)
Oracle_sid : PROD1
ORACLE_HOME : /opt/oracle/product/9204


Present listener :

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.23)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = prod1.world)
(ORACLE_HOME = /opt/oracle/product/9204)
(SID_NAME = prod1)
)
)


Modified Listener and tnsnames.ora to handle New IP address for same database :

$cat listener.ora

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.23)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 100.15.100.22)(PORT = 1522))
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = prod1.world)
(ORACLE_HOME = /opt/oracle/product/9204)
(SID_NAME = prod1)
)
)


$cat tnsnames.ora

PROD1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.23)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 100.15.100.22)(PORT = 1522))
(CONNECT_DATA =
(SERVICE_NAME = PROD1)
)
)


Nic;o)
Jan 30 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.