I created a Relational Database Service (RDS) with Oracle database at Amazon Web Services (aws.amazon.com). However, when I attempt to connect to the database (with SQLDeveloper or Navicat), I am getting:

ORA-12545: Connect failed because target host or object does not exist

Other databases in RDS work (I tested MySQL and PostgreSQL). Based on the error message I know that I can connect to the database and it's not a firewall issue.

When I connect to the database with:

nc -zv oracle3.cocvztbjagzq.us-west-2.rds.amazonaws.com 1521

I am getting:

Connection to oracle3.cocvztbjagzq.us-west-2.rds.amazonaws.com port 1521 [tcp/ncube-lm] succeeded!

I tried to reboot the DB instance and wait for a few hours. But that neither help.

Do you have an idea how to fix the problem?

Note: RDS from Amazon is provided as a service - I do not have access to the operation system.

  • Have you configured the client side tnsnames.ora correctly?
    – Philᵀᴹ
    Feb 15, 2015 at 15:49
  • I do not think that I have access to any part of the file system (and consequently to ORACLE_HOME directory).
    – user824276
    Feb 15, 2015 at 16:48
  • Client side. Your PC
    – Philᵀᴹ
    Feb 15, 2015 at 19:44

2 Answers 2


Are you able to run this command from a client that has the AWS tools configured ? (you could launch an EC2 instance with an Amazon AMI Linux image which is already configured to run this command if not)

rds-describe-db-instances --headers

This should return info to verify the port number and hostname as per here

  • The command is returning: # rds-describe-db-instances --headers rds-describe-db-instances: Malformed input-No Credentials were provided - cannot access the service Usage: rds-describe-db-instances [DBInstanceIdentifier] [--filters "key1=value1;key2=value2..." [,--filters "key1=value1;key2=value2..." ...] ] [--marker value ] [--max-records value ] [General Options] For more information and a full list of options, run "rds-describe-db-instances --help"
    – user824276
    Feb 16, 2015 at 16:48
  • 1
    I managed to connect to Oracle with SQL Developer (I had wrong SID). However, when I attempt to connect to the server with JDBC and the same setting, I am now getting: ORA-21561: OID generation failed.
    – user824276
    Feb 16, 2015 at 17:05
  • To get the rds-describe-db-instances command to work (or any other cli command) you need to provide credentials. This can be by creating an IAM user and granting it an API key. You can then export two env variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY and setting these to the values you downloaded. You can also create a role and assign the IAM role to the EC2 instance on launch. In both cases, you need to assign privs to the user or role to permit access to commands - either all commands or specific ones. Feb 16, 2015 at 23:09

The trick was in increasing the amount of RAM on the RSD. Oracle simply doesn't initialize well on db.t1.micro with 0.613GB RAM. However, once Oracle gets initialized on a bigger machine (I tested db.m3.medium), it is possible to switch the instance to db.t1.micro and run Oracle with only 0.613GB RAM.

Thank you all for your support.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.