ORA-04089: 无法对 SYS 拥有的对象创建触发器
大家下,我在sys下创建了一个student表,现在想在这个表上创建一个触发器,实现的功能是:如果删除student上的id=11的记录,则弹出'不允许删除!'的提示。
代码如下:
create or replace trigger student_delete
after delete on student
for each row
begin
if old.student.id=11 then
raise_application_error(-20000,'不允许删除!');
end if;
end;


原因可能在于没有赋予权限


ADMINISTER DATABASE TRIGGER

grant database administrator trigger to  xx;


grant ADMINISTER DATABASE TRIGGER to xxxx;