Forum Stats

  • 3,741,181 Users
  • 2,248,384 Discussions
  • 7,861,664 Comments

Discussions

Can the oci7 API be used with a 12.2 server?

user6327254
user6327254 Member Posts: 5 Blue Ribbon
edited Apr 25, 2018 3:40PM in Oracle Call Interface (OCI)

I am getting ORA-01017 when I try to connect using OCI7 API to a version 12.2 database.

I am 100% certain that the password is correct because when I retry with OCI8, it works.

I have observed this with both Windows and AIX servers.

The problem is that we have an application that was written with OCI7 and we are trying to determine if there is a problem somewhere or if this combination of OCI7 API and 12.2 server is incompatible.

Thanks

John Dorlon

Answers

  • user6327254
    user6327254 Member Posts: 5 Blue Ribbon
    edited Apr 25, 2018 3:40PM

    I'll answer my own, question, incase anyone else has the same problem.

    Yes, you can use OCI7 to connect to an Oracle 12.2 database.  Take the following steps to make it work:

    1. Add these lines to sqlnet.ora on the serverSQLNET.ALLOWED_LOGON_VERSION_CLIENT = 10
      SQLNET.ALLOWED_LOGON_VERSION_SERVER = 10
    2. Stop and restart the listener

      lsnrctl stop
      lsnrctl start
      (might take a few minutes for listener to be fully restarted, even though the command comes back immediately)
    3. change the password. You can change it to a temporary password, then back to what it was before.

      alter user <youruser> identified by X;
      alter user  <youruser> identified by <yourpassword>;
    4. run this query:select username, password_versions
      from dba_users
      where username = <YOURUSER>
    5. If you see '10G' among the values in the PASSWORD VERSIONS column, OCI7 API should be able to connect to this 12CR2 database.
This discussion has been closed.