首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >登录SQL会导致ORA-12560错误。

登录SQL会导致ORA-12560错误。
EN

Stack Overflow用户
提问于 2014-01-10 08:53:41
回答 1查看 952关注 0票数 0

几天前,我在虚拟机上创建了新的数据库。克隆它之后( IP地址也被更改),我无法使用SQL Plus连接到数据库。有趣的是,我可以在使用

代码语言:javascript
复制
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文件:

代码语言:javascript
复制
    SQLNET.AUTHENTICATION_SERVICES= (NTS)

    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT) ? ADR_BASE = C:\app\Administrator\product\11.2.0\dbhome_1\log

和来自lsnrctl服务的输出

代码语言:javascript
复制
 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

我能进一步排除它吗?

EN

回答 1

Stack Overflow用户

发布于 2014-01-10 17:22:34

( A)检查%ORACLE_HOME%/dbs/中的密码文件

( B)编辑远程连接的tnsnames.ora (如果它是windows主机,看起来您必须使用oradim创建一个windows服务:

代码语言:javascript
复制
oradim -startup -sid %your_oracle_sid% –usrpwd %your_password% -starttype SRVC,INST -pfile %pfile_location%
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/21039757

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档