I'm trying to import the full database to a pluggable database in Linux OS. I am getting the below error while connecting to the schema.
sqlplus system#OCIPROD
SQL*Plus: Release 12.1.0.2.0 Production on Sun Aug 28 10:25:21 2022
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password: ERROR: ORA-12514: TNS:listener does not currently know
of service requested in connect descripto
I tried pinging to TNS and listener services seem to be up.
Does anyone face this issue or can anyone help me to understand what could be the solution for this?
Related
I am trying to configure a database in Oracle SQL Developer, database is Oracle 21c. Upon initial troubleshooting it seems to be an issue with the listeners. Below are some more details that will help for troubleshooting.
When I try to check status of listener in cmd (admin mode), I get below error:
C:\Windows\System32>lsnrctl status
LSNRCTL for 64-bit Windows: Version 21.0.0.0.0 - Production on 18-NOV-2022 20:24:49
Copyright (c) 1991, 2021, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.207)(PORT=1521)))
TNS-12535: TNS:operation timed out
TNS-12560: TNS:protocol adapter error
TNS-00505: Operation timed out
64-bit Windows Error: 60: Unknown error
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
64-bit Windows Error: 2: No such file or directory
and when I try to start listener, I get below error :
C:\Windows\System32>lsnrctl start
LSNRCTL for 64-bit Windows: Version 21.0.0.0.0 - Production on 18-NOV-2022 20:26:01
Copyright (c) 1991, 2021, Oracle. All rights reserved.
Starting tnslsnr: please wait...
TNSLSNR for 64-bit Windows: Version 21.0.0.0.0 - Production
System parameter file is C:\app\patil\product\21c\homes\OraDB21Home1\network\admin\listener.ora
Log messages written to C:\app\patil\product\21c\diag\tnslsnr\Nisarg\listener\alert\log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.207)(PORT=1521)))
TNS-12545: Connect failed because target host or object does not exist
TNS-12560: TNS:protocol adapter error
TNS-00515: Connect failed because target host or object does not exist
64-bit Windows Error: 49: Unknown error
Listener failed to start. See the error message(s) above...
Below is the error we get when we try to connect from Oracle SQL Developer :
There is no problem with the service, screenshot below :
Below thing also helps to confirm that there is no issue with the DB :
Microsoft Windows [Version 10.0.22621.819]
(c) Microsoft Corporation. All rights reserved.
C:\Users\patil>sqlplus / as sysdba
SQL*Plus: Release 21.0.0.0.0 - Production on Fri Nov 18 20:37:34 2022
Version 21.3.0.0.0
Copyright (c) 1982, 2021, Oracle. All rights reserved.
Connected to:
Oracle Database 21c Express Edition Release 21.0.0.0.0 - Production
Version 21.3.0.0.0
SQL> select name, open_mode from v$pdbs;
NAME
--------------------------------------------------------------------------------
OPEN_MODE
----------
PDB$SEED
READ ONLY
XEPDB1
READ WRITE
SQL>
Connecting successfully using SQL Developer but when i use sqlplus in Oracle Instant Client then i get following issues
Method 1:
[integrator#a-esb-app01 instantclient_19_8]$ ./sqlplus EGOINT#139.138.267.202:1521:EPROD
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Dec 22 18:14:36 2020
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12545: Connect failed because target host or object does not exist
Enter user-name: egoint
Enter password:
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
Method 2:
[integrator#a-esb-app01 instantclient_19_8]$ ./sqlplus EGOINT#139.138.267.202:1521/EPROD
SQL*Plus: Release 19.0.0.0.0 - Production on Tue Dec 22 18:18:13 2020
Version 19.8.0.0.0
Copyright (c) 1982, 2020, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
Not Sure which of above is correct method and what is issue with connection string or any changes required on server side?
Note: I am able to connect another Oracle Server successfully. So no issue with InstantClient
Fixed using following:
./sqlplus egoint/egoint#(description=(address=(protocol=tcp)(host=139.138.267.202)(port=1521))(connect_data=(sid=EPROD)))
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?
I am attempting to connect to an Oracle 11.2.0.2 64 bit database from a Win 7 and Win 8.1 machine with the Oracle 11.2.0.4 32 bit client. I can successfully ping the server and TNSPing the listener on both machines. But when I try to log into SQLPLus using system and my password I receive ORA-12560 TNS:Protocol Adapter Error. I can log into SQLPlus on the server. Any ideas? DB has been restarted as well as the listener. ORACLE_SID is set. I'm stuck...
If I'm following what you're seeing, it sounds like you just want to set the LOCAL enviroment variable on your Windows boxes to the TNS alias; then you don't have to supply that as you try to connect.
This is with the 12c instant client but the effect is the same with the 11g client. Specifying an alias as the connect strings works (the ORA-01017 is still coming from the DB):
c:\Program Files\instantclient_12_1>sqlplus -l x/y#abcd
SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 23 17:12:34 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Connecting without the alias gets your ORA-12560:
c:\Program Files\instantclient_12_1>sqlplus -l x/y
SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 23 17:11:58 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-12560: TNS:protocol adapter error
But if I set LOCAL then I can connect as if I had specified the alias:
c:\Program Files\instantclient_12_1>set LOCAL=abcd
c:\Program Files\instantclient_12_1>sqlplus -l x/y
SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 23 17:14:23 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
You don't need to have ORACLE_SID set as that is only used for bequeath connections where the client and server are on the same box.
when i try to connect our programme with oracle with this command
sqlplus crbt/crbt#crbt_new here crbt is the username and crbt_new is the password.
it is giving error this
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jan 4 10:32:42 2011
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
ERROR:ORA-12541: TNS:no listener
So please tell me where this is wrong
Below are the possibilities for this:
1) Listener might be down
2) When database is not up, 'TNS: no listener' error appears
3) If the TNS entries are not correct.
Ex: The TNS entry of crbt_new database might have the port number mentioned as 1531, but in real the Database would be listening on port 1521