Oracle Error ORA-39767: finish is not allowed when unloaded stream data exists

Oracle Error Message

ORA-39767: finish is not allowed when unloaded stream data exists

Reason for the Error

A direct path finish was attempted when at least one stream buffer has not been completely loaded.

Solution

All streams must be loaded after a column array to stream conversion until load stream returns a status of OCI_SUCCESS or OCI_NO_DATA. The load can then be finished.