当我需要登录Oracle 12c时,会出现此消息
C:\Users\Administrator>sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Tue Apr 16 09:17:09 2019
Copyright (c) 1982, 2017, Oracle. All rights reserved.
ERROR:
ORA-12560: TNS:protocol adapter error
但是当我尝试使用TNS登录时,一切正常,如下所示
C:\Users\Administrator>sqlplus
SQL*Plus: Release 12.2.0.1.0 Production on Tue Apr 16 09:20:13 2019
Copyright (c) 1982, 2017, Oracle. All rights reserved.
Enter user-name: sys@orcl113 as sysdba
Enter password:
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL>
OracleOrclService运行,并且我设置了oracle sid SET ORACLE_SID = orcl, 但仍然没有区别。
我的TNS文件是:
# tnsnames.ora Network Configuration File: C:\app\Administrator\virtual\virtual\product\12.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = srvv113)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL113 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = srvv113)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
如果您能解决我的问题,我将非常感激。