操作系统下登陆数据库时,如果密码中包含@字符时,需要进行转义,否时报
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>
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博客 ” ,链接:http://blog.itpub.net/29446986/viewspace-1606824/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29446986/viewspace-1606824/