My Oracle Support Banner

OCIAttrGet Returns Scale 0 Instead Of -127 For SEQUENCE.NEXTVAL (Doc ID 1137913.1)

Last updated on JANUARY 30, 2022

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

A call to the OCI API function OCIAttrGet Returns Scale 0 Instead of -127 for a sequence object that returns nextval after upgrade to 11g. i.e SEQUENCE.NEXTVAL

For Example:

err = getOCIError(OCIAttrGet((dvoid*)phColumn,(ub4) OCI_DTYPE_PARAM,(dvoid*)&ociv_scale,(ub4 *)0,(ub4)OCI_ATTR_SCALE,m_dbImp->m_hError));

The return value of the ociv_scale variable is -127 with database version earlier than 11g,  however the return value of ociv_scale variable is 0 (Zero) from an Oracle 11g server and onward.


Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.