Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to connect into SQLPlus if current password is reserved word?

Blue BirdJun 30 2016 — edited Jun 30 2016

Hello,

I was experimenting with SQLPlus console and came into weird situation. I configure file sqlnet.ora so that I can connect only with my actual password (by default you can press just Enter or type any password). Then I change my current password with "password" command. For my testing purposes I accidently set "as" as my new password. When I logged off and try to connect again with "connect sys as sysdba" I couldn't log in anymore with this new password. I solved my problem by changing my new psw back to something else over SQL Developer, but how can I do that only over SQLPlus? It's look like SQLPlus took my new as reserved word and I get error message: "SP2-0306: Invalid option."

SQL> connect sys as sysdba

Enter password:

SP2-0306: Invalid option.

Usage: CONN[ECT] [{logon|/|proxy} [AS {SYSDBA|SYSOPER|SYSASM}] [edition=value]]

where <logon> ::= <username>[/<password>][@<connect_identifier>]

      <proxy> ::= <proxyuser>[<username>][/<password>][@<connect_identifier>

This could probably also happen with some other Oracle "reserved" words user couln't know. How you can type your password verbatim like verbatim string in C# e.g. @"as"? Or how to login again in SQLPlus in such scenario?

BB

This post has been answered by Pavan Kumar on Jun 30 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 28 2016
Added on Jun 30 2016
7 comments
6,305 views