几天前我在虚拟机上创建了新数据库。克隆后(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
我可以进一步排除故障吗?
答案 0 :(得分:0)
A)检查%ORACLE_HOME%/ dbs /
中的密码文件
B)编辑你的tnsnames.ora以进行远程连接
C)如果它是一个Windows主机,看起来你必须使用oradim创建一个Windows服务:
即:
oradim -startup -sid %your_oracle_sid% –usrpwd %your_password% -starttype SRVC,INST -pfile %pfile_location%