Yes we have faced this issue with CacheStream global growing out of control. We have had to create custom purge utilities to clean this data up as well as making sure any of our persistent classes that leverage a Stream class will trigger deletes on the stream when our record is deleted.

You would think the product would be able to handle this as part of cleanup of Ens.messageHeader, but alas that is not the case.

Well you can have more than one cursor. The main problem is in the second query, we joined Ens.Messageheader to EnsLib_HL7.Message and referencing the Identifier field of EnsLib_HL7.Message was causing a compiler error on the SQL query. Once that field was removed, everything is fine. The oddity is the query would work fine on the Management Portal SQL web page, but would not work in code.

The error was  multiple Referenced macro not defined errors.