When the password of an Oracle Database User contains special characters such as @, the user can directly use the normal password for input. the login fails because oracle resolves the characters After @ into the network service name.
In the following example, the username is: wang and the password is oracle @ 1. The network service name is sun:
Linux: 'wang/"oracle @ 1" '@ sun -- one double quotation mark password, one single quotation mark username + password, that is: 'User name/"password" '@ service name
[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,200 9, Oracle. All rights reserved.
ERROR:
ORA-12532: TNS: invalid argument
[11: 42: 24oracle @ dvd adump] $ sqlplus 'wang/"oracle @ 1"' @ sun -- password for a double quotation mark extension, and username and password for a single quotation mark extension, that is: 'User name/"password" '@ service name
SQL * Plus: Release 11.2.0.1.0 Production on Tue Oct 30 11:42:25 2012
Copyright (c) 1982,200 9, Oracle. All rights reserved.
Connected:
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 -- three double quotation marks for password extension, that is, username/" "password" @ service name
C: \ Users \ wanglei. ITADMIN> sqlplus wang/oracle @ 1 @ sun
SQL * Plus: Release 11.2.0.1.0 Production on Tuesday October 30 13:20:00 2012
Copyright (c) 1982,201 0, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS: Unable to parse the specified connection identifier
Enter the User Name:
C: \ Users \ wanglei. ITADMIN> sqlplus wang/"" oracle @ 1 "@ sun -- password added with three double quotes, that is, username/" "password" @ service name
SQL * Plus: Release 11.2.0.1.0 Production on Tuesday October 30 13:20:30 2012
Copyright (c) 1982,201 0, Oracle. All rights reserved.
Connect:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
With the OLAP and Data Mining options
SQL>