Building Rules

SmartMode allows two types of governing rules, custom or data.

  • Custom rules are created to address general business customs and specific access methods or restrictions that can be applied to individual databases or to all database access.
  • Data rules are created by SmartMode when you build a rule file with the available usage monitor data for a specific database.

In this section:

Rule Files

How to:

Build a Rule File

Recreate Rule Files

Delete a Rule File

Reference:

Build Rule Properties

Rule files containing data rules include information such as past resources consumed compared to current shift thresholds and syntax specifics like fields being accessed, or sorts being performed. When data rules are executed by an application accessing a database with governing turned on, the rules compare the current syntax specifics with what was selected from historical information.

A rule file may contain custom rules only, data rules only, or both.

When building data rules, SmartMode uses the shifts and thresholds you have set and the Usage Monitoring data, to determine whether a request is allowed to execute. In order for SmartMode to make this prediction it must first generate rules. Then, when a user requests a report, SmartMode looks at the request and uses the rules to determine whether to allow the request to run.

Once shifts and thresholds have been created, and after SmartMode has collected a representative and diversified sample of requests you are ready to build rules for each database you want to govern.

Building rules ensures that you only create rules for the active shifts within the appropriate date and time ranges. You are prevented from activating requests that are estimated to exceed the shift thresholds you chose when you set up the Shift and Threshold parameters. In addition to selecting date ranges for the use of monitored data, you are able to turn Governing on and off and apply custom rules. For more information on custom rules, see Custom Rules.


Top of page

Rule Files

Building or creating rules creates a complete program or rule file that contains the rules, active shifts, and thresholds for a database. This program (also referred to as a knowledge base) is what SmartMode runs during query or report execution to determine whether the request against the database should run.

You can build rule files with:


Top of page

Reference: Build Rule Properties

The following table lists and describes the options found on the Build rule files window.

Option

Description

Opt

The letter option indicating what action to take for each row in the table.

Database Name

The name of the database for which you are creating a rule file.

Source

The database type for a relational table name used with direct passthru, or MASTER for databases accessed with Master and Access Files.

Rule File

The name of the rule file that SmartMode executes to determine whether the request can run.

Custom Rule

The name of the custom rule that SmartMode executes to determine whether the request can run.

Type

Indicates whether the rule file should include Data rules (D), Custom rules (C), or both (B).

PF5 Process All

Use this option to build or recreate rule files for all databases indicated by a B in the Opt column and process any D (delete) or S (select custom rules).

PF6 Build All

Use this option to Build or recreate rule files for all databases in the list.

PF3

Exits and returns to the Database control window.

PF10 New Entry

Allows you to add a new database to the list so you can build a rule file for it.


Top of page

Procedure: How to Build a Rule File

Before SmartMode can govern requests, you must first generate the rules that it uses to determine whether the request is permitted to execute. This procedure is used to build new rule files and to recreate existing rule files.

  1. Select Build Rules from the Database Control Menu. The Build rule files window opens:

  1. To build a rule file for one or more, but not all of the databases displayed, type B in the Opt column next to the database for which you want to build a rule file.

  1. If you wish to create a new rule file for a database on the list, press PF10. The following window opens:

  1. Enter the relational table name or Master file name you wish to add and press Enter. The name you enter will be added to the list on the build rules window.

  2. Enter the name of the rule file to be created.

  3. If you wish to include a Custom rule in the Rule file, type S in the Opt column to select a Custom rule for inclusion in the Rule file. If you enter S in the Opt column, the following window opens:

  1. Type S in the Option column to select a Custom rule and press Enter to return to the Build rules window.

  2. Enter a D in the Type column to build a data rule, a C to build a custom rule, and a B to build a rule containing both. If you enter C or B you must also select a custom rule.

  3. Press PF5 to build the Rule file for databases indicated by a B in the Opt column, or press PF6 to build a Rule file for all databases on the list. If you are only building Custom Rules, the rules will be built now, otherwise the following window opens:

  1. Enter the Start and End date for the monitor data to be used in building the rule file.

  1. Press Enter to build the rule file(s).


Top of page

Procedure: How to Recreate Rule Files

If the rules you are using for one or more of your databases are no longer appropriate, you must recreate the rule file. This can occur under one of the following circumstances:

You only recreate rules for data sources that have rule files assigned with them. For more information, see How to Build a Rule File.


Top of page

Procedure: How to Delete a Rule File

  1. Select Build Rules from the Database Control Menu. The Build rule files window opens:

  1. Type D in the Opt column to delete the rule file for the appropriate database and press PF5.


Information Builders