1. I would like to get all the SQLs executed against my database. Is my equation correct:
All the SQLs in a database = Dynamic SQLs (from snapshot views) + Static sqls (from stored proc/functions/packages)
2. I would like to get Dynamic SQLs with executing user ID, how to get the executing user ID?
What is the object of this exercise? I have worked in systems where you would be talking a several hundred thousand SQL statements. Not sure what good having each of them would have done me as I am not interested in probably >90% of them. Wouldn't it be better to explain all of the SQL being executed against your database, then mine the explain tables for poor access paths, the dsn_predicat_table for items that might hamper performance? Or what about snapshots for getting the top running/consuming SQL?