Solved

SQLPlus password entry

Posted on 2014-09-25
5
563 Views
Last Modified: 2014-09-30
I recently installed Oracle 12c on a WIndows server for an application which uses it, and created two databases with SYSTEM password ending with an exclamation mark. I am now trying to get back into the database some weeks later using SQLPlus to do some administration, and keep getting "ORA-01017: invalid username/password; logon denied" messages.

I know the passwords have not changed as if I use the Oracle Administration Assistant for Windows I can connect to both databases by entering SYSTEM and the appropriate password, so the issue must be related to the ! character

I have tried putting double quotes round the password but this makes no difference - any ideas?
0
Comment
Question by:rjebb
5 Comments
 
LVL 23

Expert Comment

by:David
ID: 40343785
Confirm you have correctly set the ORACLE_SID value.  Since you are trying a different method to connect, that's easy to overlook.

Confirm your typing (sorry, it does happen).

Provide us with the full command you're trying (mask the password)

Try an interactive session with one string at a time, for example:
$ORACLE_HOME/bin/sqlplus
at user prompt, just the username
at password prompt, just the password
0
 
LVL 15

Expert Comment

by:Haris Djulic
ID: 40343796
Issue is related to exclamation mark for sure since :

Nonquoted identifiers can contain only alphanumeric characters from your database character set and the underscore (_), dollar sign ($), and pound sign (#). Database links can also contain periods (.) and "at" signs (@). Oracle strongly discourages you from using $ and # in nonquoted identifiers.

You can connect to database as Sys from sqlplus and change password...
0
 
LVL 77

Expert Comment

by:slightwv (䄆 Netminder)
ID: 40343804
I just created a user on my 12c system and had to use double quotes around the password.

Make sure the character case is the same.

When in doubt, change the system passwords.

SQL> create user bob identified by "password!";

User created.

SQL> grant create session to bob;

Grant succeeded.

SQL>

Open in new window


The connect:
C:\>sqlplus bob/"password!"@mydb

SQL*Plus: Release 12.1.0.1.0 Production on Thu Sep 25 08:37:26 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Last Successful login time: Thu Sep 25 2014 08:36:00 -04:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing opt
ions

SQL>

Open in new window

0
 

Accepted Solution

by:
rjebb earned 0 total points
ID: 40343806
I have just actually figured it out, I was following someone else's instructions for setting archivelog mode on which requires DBA mode access. I have been trying to login as SYSTEM AS SYSDBA rather than SYS AS SYSDBA. But I do need to put double quotes round the password for it to work, ie

sqlplus SYS/"<pwd ending in !>"@<database> AS SYSDBA
0
 

Author Closing Comment

by:rjebb
ID: 40351776
I fugured out the answer myself, and the expert advice did not assist me in reaching the answer
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question