|
发表于 2014-4-5 18:15:56
|
显示全部楼层
DDL配置
1、过滤
pl/sql过滤,修改ddl_filer.sql文件,添加if/then语法。 .example
if ora_owner='SYS' then
retVal:='EXCLUDE';
end if;
if ora_objtype='USER' and ora_optype ='DROP' then retVal:='EXCLUDE';
end if;
if ora_owner='JOE' and ora_name like 'TEMP%' then retVal:='EXCLUDE';
end if;
使用角色过滤 DDLAUX.addRule
The following example excludes all tables with name 'GGS%'
DECLARE sno NUMBER; BEGIN sno := DDLAUX.ADDRULE(obj_name => 'GGS%' , obj_type =>
TYPE_TABLE); END
The following example excludes all temporary tables.
DDLAUX.ADDRULE(base_obj_property => TB_TEMP, obj_type => TYPE_TABLE);
The following example excludes all indexes on TEMP tables. DDLAUX.ADDRULE(base_obj_property => TB_TEMP, obj_type => TYPE_INDEX);
The following example excludes all objects in schema TKGGADMIN. DDLAUX.ADDRULE(owner_name => 'TKGGADMIN');
The following example excludes all objects in TRUNCATE operations made to TEMP tables.
DDLAUX.ADDRULE(base_obj_property => TB_TEMP, obj_type => TYPE_TABLE, command => CMD_TRUNCATE)
ddl 参数控制
exclude objtype 'PROCEDURE' &
exclude objtype 'FUNCTION' &
exclude objtype 'TYPE' &
exclude objtype 'TRIGGER' &
exclude objtype 'GRANT' &
exclude instr 'GRANT' &
exclude objtype 'DATABASE LINK' &
exclude objtype 'CONSTRAINT' &
exclude objtype 'JOB' &
exclude instr 'ALTER SESSION' &
exclude INSTR 'AS SELECT' &
exclude INSTR 'REPLACE SYNONYM' |
|