|
报错现象:
C:\Users\Administrator>tnsping orcl;
TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 24-11月-
2020 10:40:46
Copyright (c) 1997, 2010, Oracle. All rights reserved.
已使用的参数文件:
D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
TNS-03505: 无法解析名称
问题分析: 出现该问题的原因通常有两个:1、名称不存在 2、tns配置文件不存在。
检查tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.129)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
通过手工登陆进行验证数据库是否正常
C:\Users\Administrator>sqlplus sys/oracle@orcl as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 11月 24 11:01:20 2020
Copyright (c) 1982, 2010, Oracle. All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL> select name from v$database;
NAME
---------
ORCL
|
|