I met a strange question today: ORA-12154: TNS: Unable to resolve the specified connection identifier. ORA-12154: TNS: Unable to resolve the specified connection identifier SQL > conn system@webdata Enter password: ERROR: ORA-12154: TNS: Unable to resolve the specified connection identifier SQL > conn xgplat@webdata Enter password: The connected. Because I thought the client was 32 bits, I used sqlplus to log in to the oracle server, and it was still 1 SQL > conn system@webdata Enter password: ERROR: ORA-12541: TNS:no listener SQL > conn xgplat@webdata Enter password: Connected. Ask a few people everyone is relatively confused, do not know what the question. I happened to see someone saying it was something to do with the password file, and it occurred to me that all of my system/sys users’ passwords contain an @ character. For example, if my password is 123@456, sqlplus system/123@456 @webdata will be read as sqlplus system/123@456 @webdata, then sqlplus will be read as 123. This will be followed by the database connection string. This will automatically report an error and say: Unable to resolve the specified connection identifier or no listener On the server after using sqlplus/as sysdba modify sys/system password after login, try to just 1 cut normal again
When Oracle database user password contains special characters such as @, directly use the normal password input, because oracle will parse the characters after @ into the network service name, resulting in login failure User name: wang Password: oracle@1 Network service name: sun
Linux platform: ‘wang/“oracle@1”‘@sun —1 double quotation mark password, 1 single quotation mark username + password, i.e. ‘username /” 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, 2009, Oracle. All rights reserved. ERROR: ORA-12532: TNS:invalid argument [11:42:24oracle@dvd adump]$sqlplus ‘wang/“oracle@1”‘@sun —1 double quotes with password, 1 single quotes with username + password, i.e. ‘username /” password ”@ service name 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 platform: wang/"""oracle@1"""@sun— three double quotation mark passwords, i.e. : user name /""" password ""@ service name C:\Users\wanglei.ITADMIN > sqlplus wang/oracle@1@sun SQL*Plus: Release 11.2.0.1.0 Production on Week 2 October 30 13:20:00 2012 SQL*Plus: Release 11.2.0.1.0 Production Week 2 October 30 13:20:00 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. ERROR: ORA-12154: TNS: Unable to resolve the specified connection identifier Please enter user name: C:\Users\wanglei.ITADMIN > sqlplus wang/"""oracle@1""" @sun —3 enclosed passwords with double quotes, i.e. : user name /""" password ""@ service name SQL*Plus: Release 11.2.0.1.0 Production on Week 2 October 30 13:20:30 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. To connect to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the OLAP and Data Mining options