ORA-12560: TNS:protocol adapter error(TNS:协议适配器错误)

 

用sqlpuls / as sysdba 一直报错:

ORA-12560: TNS:protocol adapter error(TNS:协议适配器错误)

 

网上很多方案不能解决。

 

在stackoverflow上看到

http://stackoverflow.com/questions/28678432/tnsprotocol-adapter-error/28679157#28679157 写道
But if I set LOCAL then I can connect as if I had specified the alias:

c:\Program Files\instantclient_12_1>set LOCAL=abcd

c:\Program Files\instantclient_12_1>sqlplus -l x/y

SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 23 17:14:23 2015

Copyright (c) 1982, 2014, Oracle. All rights reserved.

ERROR:
ORA-01017: invalid username/password; logon denied
You don't need to have ORACLE_SID set as that is only used for bequeath connections where the client and server are on the same box.

 只需要设置set LOCAL=sid即可,并且ORACLE_SID 只有在oracle客户端和服务器在一台机器上时才设置。

经测试可用!



 

 oracle对Local变量的说明:http://docs.oracle.com/cd/E11882_01/server.112/e16604/ch_two.htm#i1052303

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值