DB2 set filter
This filter is only available in the Professional Edition of Gallium Data.
A set filter is invoked when a SET command is sent to the database server. This is done to set variables in the database session, for instance:
SET CLIENT WRKSTNNAME '192.168.1.69'
Parameters
Set patterns
The command(s) for which this filter should be invoked. This can be one or more strings or regular expressions.
If this is left blank, then all SET commands will cause execution of the filter (unless other parameters prevent it).
A SET command can be rejected (see Rejecting a request), but this rejection will often cause the database client to close the connection.
Client IPs
A list of IP addresses (IP4 and/or IP6) and/or regular expressions for IP addresses. If specified, only requests from matching IP addresses will cause execution of this filter.
Example:Â
12.34.56.78
1234:5678:90ab::01
regex:98\.76\..*
regex:9876:5432:.*
Users
A list of user names and/or regular expressions for user names. If specified, only queries executed by these users will cause execution of the filter.
Example:
jdoe
jdoe,asmith,wanderson
regex:us_.+
Examples
Query patterns: regex:SET CLIENT WRKSTNNAME .*
with the code:
log.info("Changing client workstation name");
context.packet.sql = "SET CLIENT WRKSTNNAME 'MachoMan'";