Blocking SQL and Creating Substitute Statements
Learn how to block a SQL statement and provide a sample SQL statement as a substitute.
Database Firewall can block SQL statements when deployed in Monitoring / Blocking (Proxy) mode. Database Firewall can block a SQL statement and you can provide a sample SQL statement as a substitute. A substitute statement may be necessary to ensure that the database client is presented with an appropriate message when a statement is blocked. This substitute statement may also be helpful in misleading a malicious user with the sample SQL statement provided. It can also be configured with a threshold value for blocking or alerting.
Substitute statements cannot be applied on the following SQL commands:
-
LOGIN USERNAME -
EXECUTE CURSOR -
ENCRYPTED -
SHUTDOWN -
DESCRIBE -
ORADEBUG -
TRANSACTION -
LOB -
INVALID OPERATION -
COMMENT -
COMPRESSED
When creating substitute statements, ensure the results can be handled by the client applications. The following is an example of a good substitute statement for Oracle Database target:
SELECT 100 FROM DUAL
You can block or warn when the SQL statements occur a specified number of times. You can choose to block the SQL statement or produce a warning if a statement repeats a specified number of times (or threshold value) in the selected cluster. You should always enable logging for blocked statements.