QSF doesn't store the query text after it has been parsed. The only really persistent object is the query plan. That said starting I believe with Ingres 2006r2, code was added to save query text in the session control block so that, in combination with sc924, it will display the text. This behavior doesn't currently apply to cursors defined in the session. Also, iimonitor will display the text with "show sessions formatted".
Regards, Teresa -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Karl & Betty Schendel Sent: Wednesday, January 24, 2007 11:08 AM To: users@lists.ingres.com Subject: Re: [Users] Retrieving stored query text >Hi all, > >Is there any chance that there exists a way to retrieve the stored query text of a named qsf query object (repeated or defined query)?Perhaps in an undocumented trace point or very well hidden ima mib object? No, because there is no stored query text. A repeated query stores the compiled plan (the QP), and throws away the stored text and the parse tree. If something changes such that the QP fails validation at execution time, the server reports a failure back to the application, which is required to re-send and re-define the repeated query. (If you look at the code that the embedded preprocessors generate for a repeated query, you'll see the loop that tries to execute the query, and defines it if the execute fails.) There is some degree of assumption within QSF that any named object (ie anything other than a non-repeated query in flight) is a QP and not anything else. I don't remember how strongly wired in that is, which would affect the difficulty of keeping the query text for a repeated query. There's also the matter of using more QSF memory, so you'd probably want a config parameter or something to turn query text saving on and off. And of course you'd need an IMA data point to return the qtext, probably for ima-trusted users only. I'd say all of this is possible but nontrivial, certainly it's not a one-hour change. Karl _______________________________________________ Users mailing list Users@lists.ingres.com http://lists.ingres.com/mailman/listinfo/users _______________________________________________ Users mailing list Users@lists.ingres.com http://lists.ingres.com/mailman/listinfo/users