75

I'm trying to connect to a schema on 11g (v11.2.0.1.0) from a PC with 9i (v9.2.0.1) client. It seems to connect fine to some schemas, but not this one - it comes back with a ORA-01017 Invalid Username/Password error every time.

The username and password are DEFINITELY correct - can anyone think of a reason why this wouldn't work?

Are there any fundamental incompatibilities between 9i and 11g?

Alex Kulinkovich
  • 4,408
  • 15
  • 46
  • 50
user1578653
  • 4,888
  • 16
  • 46
  • 74
  • 1
    The password is all lower case. We are typing in the password in lower case when logging in. – user1578653 Jan 23 '13 at 10:16
  • 2
    ok I'm going to post it here since it's the first result Google throws and I lost a bunch of hours trying to resolve this: if you are using UNIX, your are launching the command `isql user/pass@host` and your password contains $, **wrap the `user/pass@host` part with single quotes** (unix trying to replace with env var) – scruffy Dec 20 '17 at 10:21
  • Just reset password once, it worked for me. – Gunwant Nov 21 '19 at 08:08
  • 2
    Experiencing similar issue on Oracle 19c . However, it's only when I try with the connect string with the password e.g `sqlplus username/password@tns_service_name.` When I don't include the password e.g `sqlplus username@tns_service_name`, it will prompt for the password, and login successfully. What could be causing this – Josh Smith Jul 02 '20 at 13:26

19 Answers19

53

The user and password are DEFINITELY incorrect. Oracle 11g credentials are case sensitive.

Try ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE; and alter password.

http://oracle-base.com/articles/11g/case-sensitive-passwords-11gr1.php

Am_I_Helpful
  • 18,735
  • 7
  • 49
  • 73
baklarz2048
  • 10,699
  • 2
  • 31
  • 37
  • This worked! So does the 9i client do something to your password after you've entered it like change it to uppercase? – user1578653 Jan 23 '13 at 10:34
  • 3
    @user1578653 oracle9i defaults to uppercase as it didn't cater for case sensitivity. instead of changing the database to insensitive, you can connect by pasting your password in double quotes eg `sqlplus youruser/"Password"@db to pass mixed case. – DazzaL Jan 23 '13 at 10:44
  • 2
    why after that alter, we should alter password? – IProblemFactory Sep 13 '13 at 10:28
  • 3
    On Windows I had this problem when using a C# application using oracle.dataaccess 10g to connect to an 11g database. Both techniques worked for me: 1.using quotes on password. 2. alter case sensitivity. I was also using C++/OO4O clients and SQLPLUS which didn't have this problem. – Philip Beck Oct 28 '15 at 09:56
  • I also have a similar issue with using a C# app to connect, with `using Oracle.ManagedDataAccess.Client`, but adding `\"` in my Connection String around the password didn't help when trying to connect from the server. From my VS 2015 project, I can connect either way-with or without the extra quotes. Trying to figure out why connecting from one location, same code, works, but from another location, it doesn't. Even tried the `ALTER SYSTEM` command in Oracle SQL Developer and verified it changed, but when I refreshed my web page on the server and tried again, it still gave me the same error. – vapcguy Jun 21 '16 at 21:12
  • @IProblemFactory You have to change the password because it would have been created with `SEC_CASE_SENSITIVE_LOGON = TRUE` before, which means it is case-sensitive. If you turn that off, but don't reset the password, the password will still be case-sensitive, because it was created under that previous flag. – vapcguy Jun 24 '16 at 14:14
  • I figured out how to fix my issue by posting my own question, which I'll link to, here: http://dba.stackexchange.com/questions/142085/ora-01017-invalid-username-passwordlogon-denied/142149#142149 - basically, there's a bug in the 12c client where FIPS needs to be turned off because Oracle screwed up the AES encryption algorithm and made it incompatible. Setting `HKLM\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy\Enabled` to `0` disables FIPS and makes things work again. – vapcguy Jun 24 '16 at 14:17
  • Met a similiar situlation, connect to 11g via 10g driver, need to quote password to work around it. – neolei Apr 02 '19 at 09:07
  • This did it for me. Thank you. I logged in via command prompt with the `sqlplus` command and the username and password that worked. Connected all successful. Then I run these two commands one after another. `SQL> ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE;` `System altered.` `SQL> alter user username identified by password;` `User altered.` – Andrei Bazanov Feb 22 '21 at 11:33
  • I just solved issue with my ORA-1017 error. C# application (10g client) refused to connect to 19c database after database upgrade to 19c (user and password data were unchanged, so these data were DEFINITELY correct). SQLPLUS worked with original login data, C# application not. In my case solution was to add quotation around the password in connection string. – mich.dev Sep 21 '21 at 10:18
17

I had a similar issue some time ago. You must be careful with quotes and double quotes. It's recommended to reset the user password, using a admin credentials.

ALTER USER user_name IDENTIFIED BY new_password;

But don't use double quotes in both parameters.

Daniel Williams
  • 8,912
  • 15
  • 68
  • 107
TheGabiRod
  • 418
  • 4
  • 14
17

for oracle version 12.2.x users cannot login using case insensitive passwords, even though SEC_CASE_SENSITIVE_LOGON = FALSE if PASSWORD_VERSIONS of user is not 10g.

following sql should show the PASSWORD_VERSIONS for a user.

select USERNAME,ACCOUNT_STATUS,PASSWORD_VERSIONS from dba_users;
USERNAME          ACCOUNT_STATUS    PASSWORD_VERSIONS 
---------------   --------------    -----------------
dummyuser         OPEN              11G 12C

to make PASSWORD_VERSIONS compatible with 10g

add/modify line in sqlnet.ora of database to have SQLNET.ALLOWED_LOGON_VERSION_SERVER=8 restart database change/expire password for existing user new users created will also have same settings after above steps PASSWORD_VERSIONS should be something like this

select USERNAME,ACCOUNT_STATUS,PASSWORD_VERSIONS from dba_users;
USERNAME          ACCOUNT_STATUS    PASSWORD_VERSIONS 
---------------   --------------    -----------------
dummyuser         OPEN              10G 11G 12C
ManishSingh
  • 1,016
  • 11
  • 9
12

If all else fails, try resetting the password to the same thing. I encountered this error and was unable to work around it, but simply resetting the password to the same value resolved the problem.

lucrussell
  • 5,032
  • 2
  • 33
  • 39
4

You may connect to Oracle database using sqlplus:

sqlplus "/as sysdba"

Then create new users and assign privileges.

grant all privileges to dac;
Lay Leangsros
  • 9,156
  • 7
  • 34
  • 39
4

Oracle 11 G and 12 C versions suggest to use more complex passwords, Although there is no issues during the user creation. The password must be alphanumeric and with special character.

Verify the password version and status of the user:

select * from dba_users where username = <user_name>;

Amend it to be like below in case of 11G 12C:

alter user <user_name> identified by Pass2019$;

Now test connection!

ram
  • 2,275
  • 3
  • 27
  • 38
3

I had the same issue and put double quotes around the username and password and it worked: create public database link "opps" identified by "opps" using 'TEST';

Greg
  • 31
  • 1
3

I am not an expert. If you are getting ORA-01017 while trying to connect HR schema from SQL Developer in Oracle 11g Please try to unlock the HR as follows

alter user HR identified by hr DEFAULT tablespace users temporary tablespace temp account unlock;

3

I had the same error, but while I was connected and other previous statements in a script ran fine before! (So the connection was already open and some successful statements ran fine in auto-commit mode) The error was reproducable for some minutes. Then it had just disappeared. I don't know if somebody or some internal mechanism did some maintenance work or similar within this time - maybe.

Some more facts of my env:

  • 11.2
  • connected as: sys as sysdba
  • operations involved ... reading from all_tables, all_views and granting select on them for another user
Andreas Covidiot
  • 4,286
  • 5
  • 51
  • 96
2

I had a similar issue. The id/pw I was using was correct, but I was getting ORA-01017 Invalid Username/Password on one particular connection only.

It turned out that my connection settings in Oracle SQL Developer had the "Use DB Proxy Authentication" turned on in the "Proxy User" tab. I didn't notice that for quite a while.

enter image description here

After I unchecked that option, it worked fine.

Glen Little
  • 6,951
  • 4
  • 46
  • 68
1

I also had the similar problem recently with Oracle 12c. It got resolved after I changed the version of the ojdbc jar used. Replaced ojdbc14 with ojdbc6 jar.

1

I face the same issue for connection in laravel 7 I face issue that my password is used in charater base when the password goes to the connect file is not go incomplete from .so I give the string password in my oci8.php file

0

The tip on Oracle's OTN = Don't type your password in TOAD when you try to connect and let it popup a dialog box for your password. Type the password in there and it will work. Not sure what they've done in TOAD with passwords but that is a workaround. It has to do with case sensitive passwords in 11g. I think if you change the password to all upper case it will work with TOAD. https://community.oracle.com/thread/908022

ridi
  • 162
  • 9
0

I also got the same sql error message when connecting through odp.net via a Proxy User.

My error was that my user was created with quotation marks (e.g. "rockerolf") and I then also had to specify my user in the connectionstring as User Id=\"rockerolf\"..

In the end I ended up deleting the user with the quotation marks and create a new one without..

face palm

gautejohan
  • 428
  • 5
  • 8
0

I know this post was about 11g, but a bug in the 12c client with how it encrypts passwords may be to blame for this error if you decide to use that one and you:

  • Don't have the password case-sensitivity issue (i.e. you tried ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE and resetting the password and still doesn't work),
  • Put quotes around your password in your connection string and it still doesn't help,
  • You've verified all of your environmental variables (ORACLE_HOME, PATH, TNS_ADMIN), and the TNS_ADMIN registry string at HKLM\Software\Oracle\KEY_OraClient12Home is in place,
  • You've verified your connection string and user name/password combination works in Net Manager, and
  • You can connect using SQL*Plus, Oracle SQL Developer using the same credentials.

All the basic checks.

Fix: Try setting HKLM\System\CurrentControlSet\Control\Lsa\FIPSAlgorithmPolicy\Enabled to 0 in the registry (regedit) to disable FIPS.

Oracle.ManagedDataAccess and ORA-01017: invalid username/password; logon denied

ORA-01005 error connecting with ODP.Net

https://community.oracle.com/thread/2557592?start=0&tstart=0

https://dba.stackexchange.com/questions/142085/ora-01017-invalid-username-passwordlogon-denied/142149#142149

vapcguy
  • 7,097
  • 1
  • 56
  • 52
  • 1
    Sorry, downvoter, but there's reasons I posted this - there are checks here that a person might want to do even for 11g, and someone that encounters this same error but has 12c, and Googles this error might come to this post and want to know other things that could cause this error. None of the other things here helped me, so I found these things. – vapcguy Aug 10 '20 at 18:51
0

I had a similar problem recently with Oracle 12c. I created a new user with a lower case password and was able to login fine from the database server but all clients failed with an ORA-01017. The fix turned out to be simple in the end (reset the password to upper case) but took a lot of frustrating effort to get there.

Jim H
  • 106
  • 1
  • 3
0

Credentials may be correct and something else wrong. I based my pluggable DB connection string on its container DB. Instead of the original parent.example.com service name the correct appeared to be pluggable.example.com.

Jan Molnár
  • 410
  • 7
  • 14
0

in my case with oracle database using tableplus build 373 on my m1 device type username and password in another text editor, copy and paste into username and password in tableplus. when i type in tableplus the text automatically changes to lowercase. because i had no problem with sqldeveloper, but when trying tableplus it always refused now i have solved it. i dunno why its problem on apps or other, but i have solved by the trick.

Yogi Arif Widodo
  • 563
  • 6
  • 22
0

Long time to answer, but I suggest to add

SQLNET.ALLOWED_LOGON_VERSION_SERVER=8

into sqlnet.ora

That will fix your issue.

markalex
  • 8,623
  • 2
  • 7
  • 32
Hung Tran
  • 21
  • 4