abuhaneef
asked on
SQLPLUS Command Line with Password
I am attempting to run a sqlplus commandline connect, but my database password has a "@" symbol. For example,
sqlplus username/P@ssword@123.45.6 7.111:1521 /SID123 @myscript.sql
I suspect that it is failing at the @. How can I get this to work?
sqlplus username/P@ssword@123.45.6
I suspect that it is failing at the @. How can I get this to work?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
sqlplus /nolog
SQL> conn asuri/"a@suri"
Connected.
or if in Shell, " is a special character so you have to escape it
sqlplus asuri/\"a@suri\"@DBNAME
SQL*Plus: Release 11.2.0.3.0 Production on Sat Aug 6 21:28:06 2016
SQL>
SQL> conn asuri/"a@suri"
Connected.
or if in Shell, " is a special character so you have to escape it
sqlplus asuri/\"a@suri\"@DBNAME
SQL*Plus: Release 11.2.0.3.0 Production on Sat Aug 6 21:28:06 2016
SQL>
ASKER
When I used the escape characters, I get
ERROR:
ORA-12638: Credential retrieval failed
Then it give s me the username: prompt. After I type in the username and password I get
Enter user-name: myusername
Enter password:
ERROR:
ORA-12154: TNS: could not resolve the connect identifier specified
I am beginning to think the problem is with the tnsnames.ora file.
ERROR:
ORA-12638: Credential retrieval failed
Then it give s me the username: prompt. After I type in the username and password I get
Enter user-name: myusername
Enter password:
ERROR:
ORA-12154: TNS: could not resolve the connect identifier specified
I am beginning to think the problem is with the tnsnames.ora file.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Change the password, remove the @, retry script. If script works, @ is the issue, consider using a password without @. If script is not working, then you have another issue, If you have another issue than the base for this question isn't really there...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ORA-12154 : TNS: could not resolve the connect identifier specified.
I have verified that I can connect to the database via SQL Developer.