473,327 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Multiple IP on Listener.ora & Tnsnames.ora

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
2 43388
nico5038
3,080 Expert 2GB
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
Dwie
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

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

Similar topics

1
by: Carl Corcoran | last post by:
I'm developing a website for work that exports some reports to excel. I am using the... Response.AddHeader "Content-Disposition","attachment;filename=report.xls" Response.ContentType =...
8
by: Shawn Casey | last post by:
Consider the following code: interface IBase { virtual void BaseFunction() = 0; }; interface IDerived : public IBase { virtual void DerivedFunction() = 0;
1
by: Andy | last post by:
I'm using Mysql Max-4.1.4-gamma for Linux. I have a question related to a problem with my database server. If on my db server I have 2 different database, say DB1 & DB2, I create two INNODB tables...
8
by: Geopsaros | last post by:
Hi! I have created a custom trace Listener class, called "DBTraceListener" it works fine when i add it manually in code : (eg. Trace.listeners.add(new DBTraceListener("myDBListener",...
2
by: David | last post by:
Hi, I have an MS Access database in which the tables have been exported to a MySQL DB on a Cobalt Qube 3 server and then import linked back into MS Access. This was all done via an User DSN...
9
by: toton | last post by:
Hi, I am looking for a circular buffer solution ( a fixed buffer) , where the elements can be pushed back & removed front. It looks stl deque can be a solution. my question is, 1) circular...
2
by: samarendraswain | last post by:
accesing datas from multiple columns and shown in a dropdownlist which is used in datalist i need the complete code
1
by: jramprasad | last post by:
hi i'm new one to oracle dba i installed oracle 9,.2 on my Windows XP, i created a database empdetails,Could some one help me how configuration Listener.ora and Tnsnames.ora in a single system. IF...
3
by: JMANTN | last post by:
Hello, I'm hoping someone could help me out with a problem I've ran into while trying to create a training database. I'm just a beginner with Access and VBA so please take that into consideration. ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.