在cmd输入tnsping orcl
如果成功:这个样子
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 27-9月 -2019 14:47:02
Copyright (c) 1997, 2010, Oracle. All rights reserved.
已使用的参数文件:
C:\app\ShiYaXin\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名
尝试连接 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (0 毫秒)
C:\Users\ShiYaXin>