Hi,
One of my customers is complaining that their Cold-Fusion application sometimes gets really really slow and they have some idea that it's because of the users running some long, exhaustive queries. He wants to know if I can capture the SQLs for him. The SQLs are generated dynamically so there is no way of knowing it at the application level.

I know v$sql will show the SQLs in the Shared SQL area. Explain_Plan will also show similar information but this type of information is available only when the SQL is running not a few hours later when customer calls and complains about performance.

Is there a way to log all the SQLs generated with the user information? This needs to be done at the database level ?
I know this will generate a *lot* of information but I want to give it a shot.

Thanks,