Database Query Logging (DBQL) provides a series of predefined tables and views that store historical records of queries based on rules you specify.
For more information on DBQL, see Tracking Query Behavior with Database Query Logging: Operational DBAs.