Closed zmitzie closed 7 years ago
Could you connect to the database with sqlplus on your macOS?
$ sqlplus user/pass@mydb.amazonaws.com:1521/ORCL
Could you confirm that your hosts files were edited correctly on your macOS?
$ ping mydb.amazonaws.com
FYI,
lister.ora
out of the database machine has no effect.
tnsnames.ora
has no effect if easy connect naming is used.
I have resolved the issue https://github.com/rsim/oracle-enhanced/issues/1128
Thanks a lot!
How did you solve the problem? I'm having the same.
I have created a rails 4 app and I'm using the
activerecord-oracle_enhanced-adapter
to use Oracle as my database. I'm on MacOS and I have installed all the dependencies properly (ruby-oci8, instantclient, etc). I have inserted my database credentials in my database.yml file, but when I run the server I get the following errorORA-12541: TNS:no listener
.I have checked all the similar questions in Stackoverflow but none of them seems to solve my problem. I have also configured a
tnsname.ora
andlistener.ora
file under$ORACLE_HOME/network/admin
. I am able to connect to the database from the Oracle SQL Developer running in my laptop successfully.I'm also attaching my Gemfile, database.yml, tnsname.ora and listener.ora files below:
Gemfile:
database.yml:
listener.ora:
tnsname.ora
The environment variable
TNS_ADMIN
points to/opt/oracle/network/admin
, where the 2 .ora files are located. I have also edited my hosts file and added my DB's host under 127.0.0.1. I'm using Oracle 12c.Any help is highly appreciated. Thank you.