几天前,我在虚拟机上创建了新的数据库。克隆它之后( IP地址也被更改),我无法使用SQL Plus连接到数据库。有趣的是,我可以在使用
C:\Users\Administrator>set ORACLE_SID=clm
C:\Users\Administrator>sqlplus
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jan 10 00:36:11 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Enter user-name: SYSDBA AS SYSDBA
Enter password:
ERROR:
ORA-12560: TNS:protocol adapter error当我使用以下状态集时,情况也是一样的:C:\Users\Administrator>sqlplus sysdba/clm@//localhost:1521/clm
这是我的C:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora文件:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) ? ADR_BASE = C:\app\Administrator\product\11.2.0\dbhome_1\log和来自lsnrctl服务的输出
C:\Users\Administrator>lsnrctl services
LSNRCTL for 64-bit Windows: Version 11.2.0.1.0 - Production on 10-JAN-2014 00:45
:24
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
Services Summary...
Service "clm" has 1 instance(s).
Instance "clm", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1036 refused:0 state:ready
LOCAL SERVER
Service "clmXDB" has 1 instance(s).
Instance "clm", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: WIN-E5E1BKVLT79, pid: 988>
(ADDRESS=(PROTOCOL=tcp)(HOST=WIN-E5E1BKVLT79)(PORT=62941))
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:85 refused:0 state:ready
LOCAL SERVER
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: WIN-E5E1BKVLT79, pid: 2484>
(ADDRESS=(PROTOCOL=tcp)(HOST=WIN-E5E1BKVLT79)(PORT=49201))
The command completed successfully我能进一步排除它吗?
发布于 2014-01-10 17:22:34
( A)检查%ORACLE_HOME%/dbs/中的密码文件
( B)编辑远程连接的tnsnames.ora (如果它是windows主机,看起来您必须使用oradim创建一个windows服务:
oradim -startup -sid %your_oracle_sid% –usrpwd %your_password% -starttype SRVC,INST -pfile %pfile_location%https://stackoverflow.com/questions/21039757
复制相似问题