Thursday, June 11, 2020

Oracle SQLPlus -- ORA-12514 When Connecting Using EZConnect

Problem

You are connecting to an Oracle Database using EZCONNECT (Easy Connect naming method) and omitting the password to make it to be prompted:

sqlplus system@win64ora64:1521/db1

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 11 19:59:14 2020

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

You are getting either
ORA-12514 or ORA-12504 error messages

Solution 

In order to make the password to be prompted, use this syntax:

sqlplus username@\"hostname:[port]/[service name]\"

For example:

sqlplus system@\"win64ora64:1521/db1\"

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 11 19:59:31 2020

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL>
 
 

This applies to SQLPlus 10.1 - 18.1 versions. It is fixed in SQLPlus 19.0

  

No comments: