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

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.

主站蜘蛛池模板: 衡水市| 沙湾县| 阜南县| 怀柔区| 葫芦岛市| 眉山市| 洛川县| 榆林市| 屯昌县| 中方县| 大荔县| 宜城市| 辽宁省| 屏东县| 山东省| 塘沽区| 博罗县| 珠海市| 岳池县| 天柱县| 隆化县| 休宁县| 慈溪市| 全南县| 南召县| 准格尔旗| 怀宁县| 遂昌县| 五指山市| 文登市| 杭州市| 张北县| 独山县| 新建县| 清苑县| 镇坪县| 商城县| 交城县| 安仁县| 阿图什市| 凭祥市|