Click here to Skip to main content
16,017,376 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

I have Computer A , IP = 10.20.30.40 (that store the Oracle Database)

I have Computer B , IP = 10.20.30.44 (with this computer i want to connect)

i have used connection string
Data Source = LOCALHOST , User = SYSTEM , Password = xxxxx

its works fine in Computer A. Even i can connect it as
Data Source = 10.20.30.40 , User = SYSTEM , Password = xxxxx


How I can Connect from Computer B - to - Computer A ?


What are the requirements for Computer B Should have??
or
i need to Change tnsnames.ora ??
my tnsnames.ora contains info like..


XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = TOPAZ)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )



Here where could i need to make changes??
I'm newer to oracle Please help me out...

Thenk's for any Help
Posted
Updated 17-Jun-11 2:40am
v2
Comments
J.Karthick 17-Jun-11 8:36am    
I used ORACLE10G...forgot to mention it...

Maybe this will help:

Oracle FAQ[^]

If not, google is your playground.
 
Share this answer
 
u can just specify the destination oracle db server name in any system which r in lan can connect to that db only

use oracleclient class to interact with oracle db
 
Share this answer
 
Thanks for your support guys..

Now i'm clear with tnsnames.ora

my mistake is

XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = TOPAZ)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)


In XE datasource i need to give my current IP and configure it as
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 198.233.6.7)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)

If you want to check whether your Database is connected,
in cmdprompt
c:/>tnsping XE
it should reply
OK<;>
Then it means your connection is works fine...

Happy coding...

Cheers.,
Karthick
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900