I am trying to connect to an Oracle XE instance on an AWS EC2 instance. I found this answer: Connecting dto an oracle database running on ec2. The answer gave some info which I had found already , and talks about using SSH if the ports are blocked. But I don’t think that is the problem here.
All AWS EC2 instances have both an internal and external IP. By default, the XE install configured tnsnames and listener for the internal IP. Is it possible to configure the listener for both IPs? When I was a wee baby, I worked at Oracle. Even back then I remember having trouble with these files. Now in my senile old age, I have no clue.
2
Answers
@alex-poole, thanks for the help. Had to make a few more changes to get everything working.
The default config in TNSNAMES and Listner has too much and seems to break if as soon as you add something new. I got rid of anything that was not essential.
@alex-poole, I was thinking exactly the same thing about the SSH, but it wasn’t working without it. So could you help me understand what is actually going on here? On the server, you see that I have put both IPs into TNSNAMES under the XE service (is that the right way to refer to it?)
Then in the Listener.ora, I am just pointing to the XE service am I not?
On the server, this is the output of
lsnrctl status
So the xe instance seems to have created the services XE, XEDB, d87270c138ed4411b8c05fba94d15f4a, xedb1 services? I’m don’t think I know what that means.
On the client side, I have neither tnsnames nor listener, which I why I guess I need to use the SSH connection? I installed the oracle instant client, but I don’t see anything to indicate that sqldev is using that in any way.
This is the connection attempt without SSH (doesn’t work)
This is the connection with SSH (does work)