我在Windows 2016服务器中拥有Oracle11g。
1。这是我使用sqlplus的方式
C:\Users\Administrator>sqlplus testuser1/Password1@orcl
SQL*Plus: Release 11.2.0.1.0 Production on Wed Nov 27 16:28:16 2019
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-12545: Connect failed because target host or object does not exist
Enter user-name:
2.tnsping也失败
C:\Users\Administrator>tnsping orcl
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 27-NOV-2019 16:29:39
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Oracle11gg.mshome.net)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl.mshome.net)))
TNS-12545: Connect failed because target host or object does not exist
3。这是tnsnames文件
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Oracle11gg.mshome.net)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.mshome.net)
)
)
感谢您的帮助。