Re: Record Users' SQL stmts & Their output
Posted in 1997
Dear Xiong, syssqexplain is in sysmaster and has the select statements. But I dont think this will help. Another option is to have set explain on in your application, have each user running from their own directory and then interogate the sqexplain.out file. Having them in a seperate directory allows you to determine the user. Also I suggest you periodically move the sqexplain.out file, extract the data and then delete it. This will stop it from growing too large. HTH, Jason On 9 Sep 1997 10:03:03 GMT, gis81566@cis.nctu.edu.tw (Xiong) wrote: > > I want to record users' SQL statements and their output and >store these data in a database. I want to complete the job with triggers. >However, I don't know: > > 1. Which system catalog is used to store users' current SQL statements? > 2. Is it safe to write an insert trigger in sysmaster? > 3. How to avoid recurisive execution of the above trigger? > 4. I can record SQL statements results with triggers, but is it possible to > work out a method to do "Create trigger xxx before SELECT ..."? > Or is there other methods to record the output of users' > SELECT statements? > 5. Is it possible to complete my subject with other solution except > triggers? > >Hope someone can help me solve these questions. Any suggestion/help/hint are >appreciated! > > >-- >Lin, Fu-Xiong > > >-- >Lin, FuXiong