[英]Can't log into Oracle DB 19c on command line - SQL Developer is fine
I can't log into Oracle 19c DB on the command line.我无法在命令行上登录 Oracle 19c DB。 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:然而,我可以使用 SQL Developer 登录并运行查询:
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.我真的很好奇为什么我无法在命令行和 Oracle SQL 开发人员中登录,这很好。 I'd like to correct this so I can log in again on the command line.
我想更正此问题,以便可以在命令行上再次登录。
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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.