I've been tasked with coming up with some mechanism that would allow me to detect when a database user queries a certain table in our system and a large result set is returned (say over 1000 rows). This is done under the premise that these large queries might be part of a data exfiltration attempt and should be reviewed by data security.
I want to log all queries where:
data from table X is included in the result set. The results contains more than 1000 rows.
How would I go about capturing this information?
Can this be accomplished using extended events? Query Store?