Managing schema rule sets
The Manage Schema Rules view displays the schema rule sets for a Db2 subsystem. From this view, you can maintain schema rule sets and rules for your organization.
This topic contains the following procedures:
To add a Manage Schema Rules view
- Open or create a workspace.
In the Product Tools perspective, click the Add View
menu arrow, and then click Add Schema Standards Rules view.
The Add Schema Standards Rules View dialog box is displayed.
- In the Add Schema Standards Rules View dialog box, select a DB2 Connection and then click OK.
The Manage Schema Rules view displays the rule sets defined for your site. It also displays the sample rule set provided by BMC. - Click Save Workspace
to save the changes to the workspace.
To add a schema rule set
- In the Product Tools perspective, select or add a Manage Schema Rules view.
- Click Add rule set
.
- In the Add rule set view, enter a name for the rule set.
- To add a rule, follow these steps:
- On the Rules tab, click Add rule
.
The Add rule view is displayed. - Enter the rule definition. For more information, see Defining-a-schema-rule.
- Click OK.
is displayed next to each added rule. Repeat steps a through c until all rules are added.
- On the Rules tab, click Add rule
- To add related rule sets, follow these steps:
- Click the Related Rule Sets tab.
- Click Include rule set
.
The Include Rule Set dialog box is displayed. - Select a Related rule set to include.
- In the Comment field, enter an explanation of the relationship.
- Click OK.
- To include additional rule sets, repeat steps b through e.
On the Options tab, enter the following values:
Field
Description
Log mode
Select one of the following values to determine the severity of violations of schema rules in this rule set:
Value
Description
Log a warning for violations
The validation process logs violations as warnings, and the operation can end successfully. This log mode overrides the log mode of any schema rule defined for this rule set.
Log a failure for violations
(Default) The validation process logs violations as errors, and the operation fails. This log mode is overridden if a parent rule set's log mode is set to warn.
Setting the rule set log mode to warn overrides all log modes in the defined rules and included rule sets.
Comment
Enter a description of the purpose of the rule set.
- Click Save changes
to save the rule set definition.
- Click Back
.
To edit a schema rule set
- In the Product Tools perspective, select a Schema Standards Manage Schema Rules view.
- In the Manage Schema Rules grid, select a rule set that you want to edit and click Edit rule set
.
The Edit rule set view is displayed. On the Rules tab, you can perform the following actions:
Purpose
Action
Add a rule
- Click Add rule
.
- Enter the rule definition. For more information, see Defining-a-schema-rule.
- Click OK.
Edit a rule
- Select a rule and click Edit rule
.
- Modify the rule definition and options. For more information, see Defining-a-schema-rule.
- Click OK.
Delete rules
- Select one or more rules for deletion and click Delete rules
.
If any of the selected rules have anext to them, the Delete Rules dialog box is displayed. Otherwise, a
is displayed next to each rule.
- In the Delete Rules dialog box, click Yes.
Selected rules with anext to them are removed from the grid. For all other selected rules, a
is displayed next to them.
Copy a rule
- Select a rule to copy and click Copy rule
.
- Modify the rule definition and options. For more information, see Defining-a-schema-rule.
- Click OK.
Rename a rule
Rename rule is disabled if any updates are pending.
- Select a rule and click Rename rule.
- In the Rename Schema Rule dialog box, enter the New name for the rule.
- Click OK.
Reset rule changes since last save
Reset rules
is disabled for any new rules (
).
- Select one or more rules and click Reset rules
.
- In the Reset Rules dialog box, click Yes.
Activate a rule
In the second column of a rule, click
.
If the rule was previously saved,
is displayed in the first column next to the rule.
Deactivate a rule
In the second column of a rule, click
.
If the rule was previously saved,
is displayed in the first column next to the rule.
- Click Add rule
On the Related Rule Sets tab, you can perform the following actions:
Purpose
Action
Include a rule set
- Click Include rule set
.
The Include Rule Set dialog box is displayed. - Select a Related Rule set to include.
- Enter a description to explain the relationship.
- Click OK.
Edit the include rule set comment
- Select a rule set.
- Click Edit comment
.
- In the Edit Related Rule Set dialog box, enter a description to explain the relationship.
- Click OK.
Remove rule sets
- Select one or more rule sets.
- Click Remove rule sets
.
- In the Remove Related Rule Sets dialog box, click Yes.
Activate a rule set
In the first column, click
.
Deactivate a rule set
In the first column, click
.
- Click Include rule set
On the Options tab, update the following values:
Field
Description
Log mode
Select one of the following values to determine the severity of violations of schema rules in this rule set:
Value
Description
Log a warning for violations
The validation process logs violations as warnings, and the operation can end successfully. This log mode overrides the log mode of any schema rules defined for this rule set.
Log a failure for violations
(Default) The validation process logs violations as errors, and the operation fails. This log mode is overridden if a parent rule set's log mode is set to warn.
Setting the rule set log mode to warn overrides all log modes in the defined rules and included rule sets.
Comment
Enter a description of the purpose of the rule set.
- Click Save changes
.
- Click Back
.
To delete schema rule sets
- In the Product Tools perspective, select a Schema Standards Manage Schema Rules view.
- In the Manage Schema Rules grid, select one or more rule sets for deletion.
- Click Delete rule sets
.
The Delete Rule Sets dialog box displays a list of the rule sets that you selected. - In the Delete Rule Sets dialog box, verify the rule sets that you selected and perform one of the following actions:
- To confirm the deletions, click Yes.
- To cancel the deletions, click No.
To copy a schema rule set
- In the Product Tools perspective, select a Schema Standards Manage Schema Rules view.
- In the Manage Schema Rules grid, select a rule to copy.
- Click Copy rule set
.
The Copy rule set view is displayed. - Edit the copied rule set name so that the name is unique.
On the Rules tab, you can perform the following actions:
Purpose
Action
Add a rule
- Click Add rule
.
- Enter the rule definition. For more information, see Defining-a-schema-rule.
- Click OK.
Edit a rule
- Select a rule and click Edit rule
.
- Modify the rule definition and options. For more information, see Defining-a-schema-rule.
- Click OK.
Delete rules
- Select one or more rules for deletion and click Delete rules
.
If any of the selected rules have anext to them, the Delete Rules dialog box is displayed. Otherwise, a
is displayed next to each rule.
- In the Delete Rules dialog box, click Yes.
Selected rules with anext to them are removed from the grid. For all other selected rules, a
is displayed next to them.
Copy a rule
- Select a rule to copy and click Copy rule
.
- Modify the rule definition and options. For more information, see Defining-a-schema-rule.
- Click OK.
Rename a rule
Rename rule is disabled if any updates are pending.
- Select a rule and click Rename rule.
- In the Rename Schema Rule dialog box, enter the New name for the rule.
- Click OK.
Reset rule changes since last save
Reset rules
is disabled for any new rules (
).
- Select one or more rules and click Reset rules
.
- In the Reset Rules dialog box, click Yes.
Activate a rule
In the second column of a rule, click
.
If the rule was previously saved,
is displayed in the first column next to the rule.
Deactivate a rule
In the second column of a rule, click
.
If the rule was previously saved,
is displayed in the first column next to the rule.
- Click Add rule
On the Related Rule Sets tab, you can perform the following actions:
Purpose
Action
Include a rule set
- Click Include rule set
.
The Include Rule Set dialog box is displayed. - Select a Related Rule set to include.
- Enter a description to explain the relationship.
- Click OK.
Edit the include rule set comment
- Select a rule set.
- Click Edit comment
.
- In the Edit Related Rule Set dialog box, enter a description to explain the relationship.
- Click OK.
Remove rule sets
- Select one or more rule sets.
- Click Remove rule sets
.
- In the Remove Related Rule Sets dialog box, click Yes.
Activate a rule set
In the first column, click
.
Deactivate a rule set
In the first column, click
.
- Click Include rule set
On the Options tab, update the following values:
Field
Description
Log mode
Select one of the following values to determine the severity of violations of schema rules in this rule set:
Value
Description
Log a warning for violations
The validation process logs violations as warnings, and the operation can end successfully. This log mode overrides the log mode of any schema rules defined for this rule set.
Log a failure for violations
(Default) The validation process logs violations as errors, and the operation fails. This log mode is overridden if a parent rule set's log mode is set to warn.
Setting the rule set log mode to warn overrides all log modes in the defined rules and included rule sets.
Comment
Enter a description of the purpose of the rule set.
- Click Save changes
to save the rule set definition.
- Click Back
.
To rename a schema rule set
- In the Product Tools perspective, select a Schema Standards Manage Schema Rules view.
- In the Manage Schema Rules grid, select a rule set and click Rename rule set.
- Enter the New name for the rule set.
- Click OK .