0

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.

Sathyajith Bhat
  • 21,321
  • 22
  • 95
  • 134

2 Answers2

0

Do you have the status "authorized" in "DB Security Group" for their "EC2 Security Group" ?

romuloigor
  • 182
  • 1
  • 11
  • I do. I think the issue is with the Oracle DB Listener. I had to change the IP address in the listener.ora file to be the new IP address after I restarted the EC2 instance. The issue is that the Oracle DB is not restarting or the listener is not re-starting after I bring back the instance. Researching now. – user1967231 Jan 11 '13 at 22:12
0

Try to use AWS RDS instead of AMI. It is super easy to setup. I spent days tweaking AWS AMI for Oracle (started with version 11, that had issues, then switched to 12, tweaked again...). With AWS RDS you can set whichever version you want (11, 12, roll back to 11 etc.). It takes all these setups easier than just configuring on your own.

With RDS - you can set oracle username, password, easily see when is running, stop it, IP address, manage access etc. (all from the UI console without ever SSH-ing to any server)..

cikavladimir
  • 443
  • 2
  • 5
  • 11