This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Oracle/OAS and the fly likes Oracle XE remote connection issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Oracle XE remote connection issue" Watch "Oracle XE remote connection issue" New topic
Forums: Oracle/OAS General Computing
Author

Oracle XE remote connection issue

shukla raghav
Ranch Hand

Joined: Aug 03, 2008
Posts: 200
Since i am about to go on a work from home leave and i am required to create a PoC. For the same reason i am required to connect to my Oracle XE installation from home.

here are the list of things that i have already done.

a. Installed oracle XE 11.2 on my office machine (windows-7).
b. since the IP addresses are generally dynamic i have installed a no-ip dynamic DNS manager. It provides me a Host name as abc.no-ip.biz which i can replace in my jdbc url string as hostname.
c. I enabled ports 1521 and 8080 in my office machine as follows - control panel > windows firewall > inbound rule > new rule > provide a name and provide the ports which you wish to allow incoming connection, similarly for the out bound rule
d. i installed Oracle SQL Developer for 11.2 at my home machine (windows-7)

i tested the server using SQLPLUS client installed locally on the office machine connect username\password and it connected perfectly. when i connect from home it does not connect.

connection anme : bbenchdb
username : system
password : mypass

host : bbench.no-ip.biz
sid : xe

to further investigate

when i ping the host address i.e. bbench.no-ip.biz from my home i get proper reply, but when i issue command : telnet bbench.no-ip.biz 1521 then i get a reply could not open connection to host on port 1521.

One more thing is that the Dynamic DNS service provides a different IP than the one that i see when i do ipconfig.

It seems the IP address that is mapped by Dynamic DNS service is not of my office machine but the router which it also specifies in its GUI as (Router/NAT).

How do i connect to my office Oracle XE server.


Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3606
    
  60

This is probably more about the network setup than about Oracle database specifically.

Doesn't your company have some administrator to help you set the connection up? If it does, it would be by far the best way to ask him for help.

Anyway, a few points: your office is connected to the outside world via some router, as you have already discovered. This router needs to be configured to accept connection from the outside world and forward them to some computer on the interval network. Theoretically, it would be possible to configure the router to forward connections on the 1521 port directly to your computer. Much more usual - and also quite safer - is to set up a VPN (Virtual Private Network) - this is a service which you can connect to from the outside, and it creates a bridge over the internet between the office network and your computer. When the VPN is active, your computer behaves as if it was connected to the office network directly (well, except for the speed ). See also Virtual Private Network on Wikipedia.

I'm not an expert on setting up the VPN in the office, though. The office router and some server(s) will have to be configured to support it, and also your office should buy a fixed IP address to avoid the hassle with Dynamic DNS services (I doubt that you can use any free dynamic DNS service for commercial purposes anyway). But even though it is some more work to set things up, I'd strongly suggest to do it via VPN, not via the direct connection to your office PC.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

When at home, do you establish a VPN connection to your office network? If so, you should be able to access the Oracle database. And the IP address for your office machine that you see at home should be the same as in the office.

If you don't use a VPN, then you are being blocked by your company's firewall.

You really should be using a VPN, that's what I use when I work from home and while using one I can access everything exactly the same as when I'm in the office.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle XE remote connection issue
 
Similar Threads
Set tomcat for static IP.
Two listeners running: Port 8080 and Port 1521
Accessing JSP page from network
TNS:protocol adapter error
HELP!!!! - Website hosting at Home Problems.. :(