Data Masker Logo

[Net 2000 Ltd. Home][Data Masker Home][Data Masker Manual][Data Masker FAQ]

The Data Masker
Create/Edit Command Rule Form

The Data Masker Create/Edit Command Rule Form

The Data Masker Create/Edit Command Rule Form

This form is used to create and edit Data Masker Command rules which are designed to run user written PL/SQL statements. The title text and button labels on the form will change as is appropriate to the create or edit mode. In the example screen shot above, the form is editing an existing Command rule.

Any valid PL/SQL statement which performs data manipulation actions (INSERT, UPDATE, DELETE) or DDL commands (CREATE INDEX, DROP TABLE etc) are valid within a Data Masker Command rule. As with all Data Masker rules - Command rules execute in the order specified by their Rule Block and Dependency state.

It is possible to implement an unlimited number of SQL statements in a Command rule. See the discussion in the Command rule help file for more information.

The Ignore ORA- errors panel permits the execution of the rule (and hence the masking set) to continue if the specified error occurs. Note that if multiple SQL statements are placed in the same Command rule the Oracle error exception handler applies to them all. See the discussion in the Command rule help file for a detailed information.

There are two modes of operation: Script mode which runs the commands as a script or PL/SQL mode which runs the commands as a PL/SQL block. The primary difference between the two modes is the wrapper placed around the SQL Statements prior to execution. When the rule is placed in PL/SQL mode the contents are inserted into an anonymous PL/SQL block. For most cases Script mode will be used. PL/SQL mode is usually only required when specialized and complex anonymous PL/SQL blocks are required. See the discussion in the Command rule help file for more information and examples.

Each Command rule will execute a commit statement after all SQL statements in the rule complete. If multiple SQL statements are used, commits can be placed in the sequence as is required.

Command rules can contain multiple statements in script mode. The Exit script after first ignored error option will cause the rule to terminate without continuing to process statements within the rule if an error occurs. In other words when an error occurs, even if it is trapped and ignored, any remaining lines in the script will not be executed. If the Exit script after first ignored error option is not active and a trapped error occurs, subsequent statements within the rule will be processed. If further errors occur the error trapping mechanism will also apply to those statements.

Command rules can have other rules dependent on them. When the If error is ignored, skip all dependent rule option is active no dependent rules will be processed if a error is trapped and ignored.

Creating or editing a Command rule is a straightforward process. Simply enter the PL/SQL statements you wish to execute in the SQL Command window and press the Create/Update Command Rule button. It can be useful to enter a summary of the rules purpose in the Description area.

Existing Command rules can be edited by double clicking on them with the mouse. Command rules are created by launching the New Command rule form using the New Rule button located on the bottom of the Rules in Set tab.

How to Create a New Command Rule

How to Create a New Command Rule


[Net 2000 Ltd. Home][Data Masker Home][Data Masker Manual][Data Masker FAQ]