0
votes

I tried to connect to an AWS RDS that I created. I used SQL Developer to add the connection. I used the default SYSTEM user of Oracle. I have configured my tnsnames and listener files by adding the following entries.

LISTENER

LISTENER = 
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = final.c3ixwyhkuph6.ap-south-1.rds.amazonaws.com)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
    )
  )

TNSNAMES

FINAL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 'final.c3ixwyhkuph6.ap-south-1.rds.amazonaws.com')(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = final)
    )
  )

LISTENER_FINAL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = final.c3ixwyhkuph6.ap-south-1.rds.amazonaws.com)(PORT = 1521))

As you can see from this screenshot

AWS RDS Description Screenshot

the hostname is 'final.c3ixwyhkuph6.ap-south-1.rds.amazonaws.com', and the port number is 1521. Also, the SID here is 'final'. These have been added correctly by my above TNSNAMES and LISTENER entries.

However when I attempt to connect, I get the following

Error on SQL Developer

Status Failure -Test failed: IO Error: The Network Adapter could not establish the connection.

What could be the source of the error?

1
That error indicates a network issue - your client PC cannot connect to port 1521 on the AWS RDS. There are a number of Amazon settings that could be blocking connections - see this doc: aws.amazon.com/premiumsupport/knowledge-center/… - kfinity
You wrote that "Also, the SID here is 'final'". But, I see that you have selected "service", not "SID" (by the way, are you sure that your SID (on AWS) is "XE" and not "ORCL" or something similar? - Srdjan

1 Answers

0
votes
  1. Make sure that your SID in SQL Developer is your database name on AWS and that you are using the correct username. In your screenshot, you have it as SYSTEM but the default username on AWS is admin. Go to the Configuration page in AWS and verify the highlighted portions in the screenshot below:

Screenshot of AWS RDS Configurationpage

  1. Assuming your DB Name in your Configuration page above is indeed "final", you should be selecting the SID option instead of Service name in SQL Developer, and inputting "final" as demonstrated in the snippet below.

Snippet of SQL Developer