I like to log the begin and the end of an SQL statement because i like to measure the time the SELECT needed.
In datawindows i have the retrievestart and retrieveend events where i can exactly do what i wish to do.
In embedded SQL i use SQLCA which is defined by an transaction object (n_tr). There is no event like a retrievestart/retrieveend. The only event provided is the sqlpreview. Instead of embedded SQL i could implement and call an of_execute(as_sqlstatement). The problem is the huge amount of embedded SQL in our application. Like tens of thousands.
Anybody out there with a breathtaking idea?
Thank you very much in advance!
Olaf
But there is a big BUT: First of all, we have a few hundred customers using our application. Means i needed access to all of there servers. This is not the case. Furthermore there are three different database systems involved: Informix, MySQL and Oracle. Those in different versions. Logging possibilities work different and we do not have the knowledge to handle them all.
The use case for client logging is the following example: Customer calls: "Please help: doing xxx needs very long today. Can you check?" --> Alright! My turn now: i access the terminal server at the client side or a team viewer session or whatever and open my client logging. I see hundreds of logging entries including the sql statements (except empbedded SQL), I see the execution times and long transactions turn up in red. I use Microsoft DebugView for this. Excellent small tool.
ISV vs corporate development are very different requirements!