Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Segment run on error



Error occurs on executing all Waterfall Segments with a  percentage in the 'Sampled Segment Option'.
The Pega  database used is DB2 10.5.

Error Messages

The following error occurs while populating the segment :

ERROR   - InsertIntoSegmentGroupStaging - Exception while executing group SQL: INSERT INTO MKTSEGSRTEST10p(PYSUBJECTID, PartitionKey) SELECT pySubjectID, mod(row_number() OVER(ORDER BY pySubjectID), 99) AS PartitionKey FROM ( (SELECT * FROM ( SELECT pySubjectID FROM SEGSRTEST10pG0 TABLESAMPLE BERNOULLI(10.0) ))) src DB2 SQL Error: SQLCODE=-901, SQLSTATE=58004, SQLERRMC=Bad Opcode 0, ref_arity 2, sqlnq_pid ID 943 (SYSIBM.SCALAG), DRIVER=4.19.49 
    at Source) ~[db2jcc4.jar:?]

Steps to Reproduce

  1. Create a segment.
  2. Add a percentage in the 'Sampled Segment Option'

Root Cause

The issue occurred due to an incompatibility between Pega's mode of performing Sampling of segment results and the DB2 database version. This functionality works in DB2 11.1.


Perform either of the following local-changes:
  • Upgrade the database to the DB2 11 series.
  • Use the Count mode (that is, 'Select a maximum of...') for Sampling segment results instead of the Percent option (this mode works with DB2 10.5).
Suggest Edit

Published January 20, 2020 - Updated December 2, 2021

Did you find this content helpful? Yes No

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us