Oracle用户密码含特殊字符时登陆失败问题
当oracle数据库用户的密码含特殊字符如 @ 时,直接使用正常的密码输入,由于oracle将@后的字符解析为网络服务名而导致登陆失败
如下演示 用户名为:wang密码为:oracle@1网络服务名为:sun 的情况:
linux平台:'wang/"oracle@1"'@sun --1个双引号扩密码,1个单引号扩 用户名+密码,即: '用户名/"密码"'@服务名
[11:41:14oracle@dvd adump]$sqlplus wang/oracle@1@sun
sql*plus: release 11.2.0.1.0 production on tue oct 30 11:41:24 2012
copyright (c) 1982, 2009, oracle. all rights reserved.
error:
ora-12532: tns:invalid argument
[11:42:24oracle@dvd adump]$sqlplus 'wang/"oracle@1"'@sun --1个双引号扩密码,1个单引号扩 用户名+密码,即: '用户名/"密码"'@服务名
sql*plus: release 11.2.0.1.0 production on tue oct 30 11:42:25 2012
copyright (c) 1982, 2009, oracle. all rights reserved.
connected to:
oracle database 11g enterprise edition release 11.2.0.1.0 - production
with the olap and data mining options
wang@sun>
windows 平台:wang/"""oracle@1"""@sun--3个双引号扩密码,即: 用户名/"""密码"""@服务名
c:\users\wanglei.itadmin>sqlplus wang/oracle@1@sun
sql*plus: release 11.2.0.1.0 production on 星期二 10月 30 13:20:00 2012
copyright (c) 1982, 2010, oracle. all rights reserved.
error:
ora-12154: tns: 无法解析指定的连接标识符
请输入用户名:
c:\users\wanglei.itadmin>sqlplus wang/"""oracle@1"""@sun--3个双引号扩密码,即: 用户名/"""密码"""@服务名
sql*plus: release 11.2.0.1.0 production on 星期二 10月 30 13:20:30 2012
copyright (c) 1982, 2010, oracle. all rights reserved.
连接到:
oracle database 11g enterprise edition release 11.2.0.1.0 - production
with the olap and data mining options
sql>