I created an EC2 linux box with: Oracle Database 11.2.0.1 64-bit Standard Edition One (ami-31739c58). Instance is running fine. I can connect to box from my personal computer using ssh (terminal in Mac OS Lion) by typing:
ssh -i predikto1.pem root@ec2-54-235-243-231.compute-1.amazonaws.com
I created a new EC2 security group opening port 1521 via TNS. I updated my tnsnames.ora
file to include the correct public DNS. I was able to connect to the Oracle DB using SQL Developer from my laptop (Macbook Air).
I stopped the EC2 instance, waited a few days, and started back up the instance. The Public DNS name changed. So I went to tnsnames.ora
file on my computer and updated the host field to reflect my latest (new) public DNS:
oradb=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=ec2-54-235-243-231.compute-1.amazonaws.com)(PORT=1521))
(CONNECT_DATA=
(SID = oradb)
)
)
I tried to connect from my laptop using SQL developer to the Oracle DB on EC2 and get an
error: TNS Listener does not currently know of SID given in connection descriptor.
I tried creating an elastic IP via EC2 instance screen and I assigned it to the instance. No luck substituting the host ec2-54-235-243-231.compute-1.amazonaws.com for the IP address either (IP is 54.235.243.231) in the TNSNAMES.ORA file. I have re-started and nothing.