官术网_书友最值得收藏!

Privileges

Before we can go any further, we need some extra privileges. These privileges will come along with the CREATE JOB privilege that we saw in the previous chapter. We need to be able to create rule sets, rules, and evaluation contexts. We can do this by using the DBMS_RULE_ADM package to grant the user, MARVIN, the required privileges:

--/
BEGIN
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE (DBMS_RULE_ADM.CREATE_RULE_OBJ, 'MARVIN');
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE (DBMS_RULE_ADM.CREATE_RULE_SET_OBJ, 'MARVIN');
DBMS_RULE_ADM.GRANT_SYSTEM_PRIVILEGE (DBMS_RULE_ADM.CREATE_EVALUATION_CONTEXT_OBJ, 'MARVIN');
END;
/

This tiny bit of code gives MARVIN the privileges to create rule sets, rules, and evaluation contexts.

We discussed earlier in the chapter what a rule is. A rule set, on the other hand, is a collection of the rules that control the chain. Mostly, we will not deal with rule sets as individual items and we will not even need to assign a name to them (but we could do so if we wanted). Normally, the names of rule sets and rules are generated by the system. We can even reuse a carefully defined rule set that relates to another chain. This chain would contain the exact set of steps, or rule set, as the original chain. Having said that, most of the time we will be happy with the system generated names. We will hardly ever refer to a rule set by name when using the Scheduler. Often, we will build new chains with custom rules for that chain. In rare cases, we can define the chain rules and the chain steps separately if needed.

主站蜘蛛池模板: 汶上县| 修文县| 离岛区| 乌拉特前旗| 封开县| 抚顺市| 镇原县| 鄯善县| 西昌市| 闸北区| 永登县| 西乌珠穆沁旗| 平顺县| 宜春市| 西和县| 容城县| 邵武市| 博爱县| 固镇县| 吴江市| 喀喇沁旗| 泰宁县| 海淀区| 清原| 班玛县| 福贡县| 蓬安县| 和龙市| 奉节县| 海盐县| 渭南市| 江门市| 青州市| 库伦旗| 襄城县| 荥阳市| 桐梓县| 新余市| 南丰县| 福安市| 三门峡市|