The Oracle user password contains special characters and thus cannot be logged on. solution:

Source: Internet
Author: User

Today I encountered a strange problem:
Using sqlplus on the client allows normal users to log on, but neither system nor sys users can log on, prompting ORA-12154: TNS: unable to resolve the specified connection identifier
SQL> conn system @ webdata
Enter the password:
ERROR:
ORA-12154: TNS: Unable to parse the specified connection identifier
SQL> conn xgplat @ webdata
Enter the password:
Connected.
I thought the client was a 32-bit server. I used sqlplus to log on to the oracle server.
SQL> conn system @ webdata
Enter password:
ERROR:
ORA-12541: TNS: no listener
SQL> conn xgplat @ webdata
Enter password:
Connected.
I asked some people who are confused and confused about the problem. When someone said it was related to the password file, I thought that the password of my system/sys user contains a @ character.
For example, if my password is 123 @ 456, you can use sqlplus to Log On As sqlplus system/123 @ 456 @ webdata, in this way, sqlplus is understood as the connection string of the database after 123. In this way, an error is reported and a prompt is displayed, indicating that the specified connection identifier or no listener cannot be resolved.
After logging on to the server with sqlplus/as sysdba, change the password of sys/system and try again.

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 platform: 'Wang/"oracle @ 1" '@ sun -- a double quotation mark password, one single quotation mark username + password, that is, '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,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 Platform: 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.