CONNECT fails with ORA-12560 on Oracle 12c and higher

 
0 Likes

Problem

A simple CONNECT that works fine on Oracle 11g fails with ORA-12560 on Oracle 12c and higher.

It appears the trailing spaces on user id and password are no longer trimmed causing the connect to fail, and the result is the same with PICX=CHARF or PICX=VARCHAR2.

Solution

As of Oracle 12cR1, this is the new behavior of Pro*COBOL – trailing spaces in the password are not removed.

In order to accommodate this change, Oracle introduces a new option "trim_password" to Pro*COBOL as of 12cR1. However, this option is never mentioned in the Oracle documentation until the Release Note in 12cR2:
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/pcbrn/index.html#PCBRN-GUID-D345B73E-3C0D-4B0E-8BA1-0D5EA8442AAF\

By default on Windows, trim_password is set to NO, whereas it is set to YES on Unix/Linux.

You may then do one of the followings:

  • Add the trim_password option into COBSQL:
    P(COBSQL) END-C trim_password=yes ENDP​
  • Update the default value of trim_password to YES in pcbcfg.cfg
Comment List
Related
Recommended