I can't log into Oracle 19c DB on the command line. This is the error I get:
PS C:\Windows\system32> sqlplus / as sysdba
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Nov 19 16:35:55 2021
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
ERROR:
ORA-12560: TNS:protocol adapter error
Enter user-name:
If I check the status of the listener it looks like it's running to me (unless I'm mistaken):
PS C:\Windows\system32> lsnrctl status LISTENER1
LSNRCTL for 64-bit Windows: Version 19.0.0.0.0 - Production on 19-NOV-2021 16:37:29
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DESKTOP-0T5DL1G)(PORT=1555)))
STATUS of the LISTENER
------------------------
Alias LISTENER1
Version TNSLSNR for 64-bit Windows: Version 19.0.0.0.0 - Production
Start Date 19-NOV-2021 16:07:28
Uptime 0 days 0 hr. 30 min. 10 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\Oracle_1\instantclient\network\admin\listener.ora
Listener Log File D:\Oracle_1\app09\oracle\base\diag\tnslsnr\DESKTOP-0T5DL1G\listener1\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=DESKTOP-0T5DL1G)(PORT=1555)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1555ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=DESKTOP-0T5DL1G)(PORT=5500))(Security=(my_wallet_directory=D:\ORACLE_1\APP09\ORACLE\BASE\admin\aws\xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "52448234712340b69f274bcc790ecfe0.company.com" has 1 instance(s).
Instance "aws", status READY, has 2 handler(s) for this service...
Service "5f0fbe5bc87148669145f9e2458c91b2.company.com" has 1 instance(s).
Instance "aws", status READY, has 2 handler(s) for this service...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "aws.company.com" has 1 instance(s).
Instance "aws", status READY, has 2 handler(s) for this service...
Service "pdb1.company.com" has 1 instance(s).
Instance "aws", status READY, has 2 handler(s) for this service...
The command completed successfully
Yet, I can log in with SQL Developer and run queries:
If I try to start the service it says that it's already been started:
PS C:\Users\bluet> net start OracleServiceAWS
The requested service has already been started.
More help is available by typing NET HELPMSG 2182.
I'm really curious as to why I can't log in on the command line and in Oracle SQL developer it's fine! I'd like to correct this so I can log in again on the command line.
CodePudding user response:
Looks like you have to specify the container you're connecting to. For example:
sqlplus sys/its_password@pdb as sysdba
----
this is your pluggable database