SQL Server filters
Request filters are invoked when a request is received from a database client.
Response filters are invoked when a response is received from the database server.
Duplex filters are invoked in both cases.
Filters are given the opportunity to look at the packet and do whatever they want with it: let it through, modify it, or reject it. Unless it's rejected, the packet is then forwarded to its destination.
log : A Logger object to output messages to the logging system
context : a container object described in the MSSQL Contexts page
Request filters types
Login filter: invoked when a login is attempted into the database.
Query filter: can be invoked for SQLBatch packets.
RPC filter: can filter calls to stored procedures
Prepared statement filter: can filter invocations of prepared statements
Request logging filter: can log any request packets to standard log or to a log file
Response filter types
Response logging filter : can log any responses from the database server to a file or to standard out.
Result set filter: can be invoked for every row in a result set, whether from a SQL query or a stored procedure call.
Result set batch filter: can be invoked if the connection is set to batch mode.
Duplex filter types
Duplex logging filter: can log requests and responses to the standard log or to a file.
Data classification filter: ensures that SQL Server's data classification feature is always available to your filter logic, even if your database clients do not support that feature.