Merge is Failing with ORA-3137 
Last updated on MAY 07, 2018
Applies to:Oracle Database - Enterprise Edition - Version 18.104.22.168 and later
Information in this document applies to any platform.
Merge statement fails with:
The merge statement as such uses many bind variables as shown by the current sql in the trace file:
MERGE INTO ORDER_ USING (SELECT :1 SystemOrderId FROM DUAL) I ON (ORDER_.SystemOrderId=I.SystemOrderId)
WHEN MATCHED THEN UPDATE SET SourceSystem=:2 ,AssetType=:3 ,OrderType=:4 , ...
WHEN NOT MATCHED THEN INSERT (SourceSystem, AssetType, OrderType, ...) VALUES (:49 ,:50 ,:51 , ...)
Note that the call stack of an ORA-3137  is rather generic and hardly useable to identify a specific issue.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms