472,328 Members | 1,780 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 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 42816
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...
8
by: Shawn Casey | last post by:
Consider the following code: interface IBase { virtual void BaseFunction() = 0; }; interface IDerived : public IBase { virtual void...
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...
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....
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...
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...
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...
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...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.