ITPub博客

首页 > 数据库 > Oracle > 登陆数据库时,如果密码中包含@字符时,需要进行转义,否时报ORA-12154?

登陆数据库时,如果密码中包含@字符时,需要进行转义,否时报ORA-12154?

原创 Oracle 作者:hurp_oracle 时间:2015-04-27 15:14:27 0 删除 编辑
操作系统下登陆数据库时,如果密码中包含@字符时,需要进行转义,否时报ORA-12154

oracle@TBZJS1:[/oracle/app/oracle/product/11.2.0/dbhome_1/bin] sqlplus  CHENJING/bzzw@4321@TBZJS1_obzjs1
SQL*Plus: Release 11.2.0.2.0 Production on Mon Apr 27 14:45:47 2015
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified

-----加双引号同样报错
oracle@TBZJS1:[/oracle/app/oracle/product/11.2.0/dbhome_1/bin] sqlplus  CHENJING/"bzzw@4321"@TBZJS1_obzjs1
SQL*Plus: Release 11.2.0.2.0 Production on Mon Apr 27 14:45:47 2015
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
-----加双引号同时对双引号进行转义可以正常登陆
oracle@TBZJS1:[/oracle] sqlplus  CHENJING/\"bzzw@4321\"@BZJS
SQL*Plus: Release 11.2.0.2.0 Production on Mon Apr 27 14:53:41 2015
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> 
SQL> 
SQL>  





来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29446986/viewspace-1606824/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-01-17

  • 博文量
    152
  • 访问量
    647363