The PL/SQL Function rule action replaces an incoming request with a valid query that Dynamic Data Masking sends to the database for execution.
When you use the PL/SQL Function action, you enter the name or the name and path of the function. You must include the path if the stored object is not in the client schema or catalog, depending on the database. On a DB2 database, you must include the path if the stored object is not in the path that is returned by the following statement from the Dynamic Data Masking administrator:
SELECT CURRENT_PATH FROM SYSIBM.SYSDUMMY1
Select the parameters that the function uses. The Rule Engine returns an error if you do not select the correct parameters for the function. You can view the rule.log file or use the Security Rule Set Simulator to verify that you selected the correct parameters.
The PL/SQL Function rule action has the following properties:
Function Name
Enter the name and full path of the PL/SQL function. For example, you might enter
HR.dbo.get_employees_masked
.
Include Database Username
Select if the function uses a database user name parameter. The database username parameter defines the user for the session.
Include OS User
Select if the function uses an operating system user parameter. The operating system user parameter defines the user name for the user logged in to the operating system.
Include Client Host
Select if the function uses a client host parameter. The client host parameter defines the client host name or IP address.
Include Program Name
Select if the function uses a program name parameter. The program name defines the application or program name.
Include Statement
Select if the function uses a statement parameter. The statement parameter defines the SQL statement text. You must define the statement in VARCHAR.
Include Text Value
Select if the function uses a text value parameter.
Value to Use
Enter a text value parameter if you selected the Include Text Value property. You can use text or a global symbol to define the text value.
The following image shows the PL/SQL Function rule action properties: