0

I am trying to connect to Oracle using SQL*Plus from Oracle instant client 12.2 but it keeps failing.

# export LD_LIBRARY_PATH=/root/oracle/instantclient_12_2
# ./sqlplus USERNAME/PASSWORD@remotehost.ancd.com:1881/TEST1.ancd.com
SQL*Plus: Release 12.2.0.1.0 Production on Fri Jan 19 19:04:03 2018
Copyright (c) 1982, 2016, Oracle.  All rights reserved.
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

I am not an Oracle expert but my understanding is I don't need a tnsnames.ora in Oracle client 12 for direct connection.

What I am going wrong?

Alex Poole
  • 183,384
  • 11
  • 179
  • 318
Anand Abhay
  • 349
  • 1
  • 3
  • 10
  • 1
    Sounds like your service name is wrong. Check `lsnrctl services` on the database server to see what it's actually listening for; or ask your DBA if yo don't have access. Or check any existing `tnsnames,ora` you have access to and see if that tells you what it should be. – Alex Poole Jan 19 '18 at 19:15
  • Hi Alex ..I did cross check service name and it is correct . Same connection string works from one machine and not from other. – Anand Abhay Jan 19 '18 at 19:19
  • You don't need a `tnsnames.ora`, no. ORA-12514 is a message from the server that it doesn't recognize the service name you sent it. So probably either you typed the connect string differently on one machine than the other, or you're connecting to a different server. You can also look in the listener.log file on the server, which should report the error. – kfinity Jan 19 '18 at 19:58

0 Answers0