Pages

Wednesday, September 5, 2012

ORA-01017: invalid username/password when connecting from a 9i ODBC driver to an 11g Database

Hi folks,

HP Openview, used for monitoring and alerting, is in it's migration phase. The database now runs on Oracle 11g. However, the Reporting Server that connects to the database underwent no such migration or upgrade. This Reporting Server is still using the Oracle 9.1 ODBC drivers.

While trying to connect to the new 11g database, the team encountered the following error:

Unable to connect
SQLState=28000
[Oracle][ODBC][Ora]ORA-01017: invalid username/password; logon denied



Interestingly, if I tried to connect using SQLPLUS, I could establish a connection without any problems.


C:\Documents and Settings\xxxxxx>sqlplus

SQL*Plus: Release 9.2.0.1.0 - Production on Wed Sep 5 10:13:57 2012

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter user-name: opc_report@xxxxxxxxxxxxx
Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select * from v$version;

BANNER
-------------------------------------------------------------------------------

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for HPUX: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

SQL>


Cause and Solution:

This was because of the usage of CASE SENSITIVE passwords in Oracle 11g. This was resolved by turning off the case sensitive feature in the database:

$ sqlplus

SQL*Plus: Release 11.2.0.3.0 Production on Wed Sep 5 10:05:06 2012

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

Enter user-name: / as sysdba

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


SQL> alter system set SEC_CASE_SENSITIVE_LOGON = FALSE
  2  scope=both;

System altered.


And, woolaaa: