无法在oracle数据库中创建触发器

时间:2017-09-04 16:40:43

标签: sql oracle oracle12c

我在本地主机上使用Oracle 12c。我想为表创建触发器。

它给了我一个错误:

"ORA-04089: cannot create triggers on objects owned by SYS"

我通过创建另一个用户并尝试创建触发器来尝试它,如此this帖子中所述。

但它给了我同样的错误。

这是我创建的用户scritp

CREATE USER DEVELOPER
  IDENTIFIED BY <password>
  DEFAULT TABLESPACE USERS
  TEMPORARY TABLESPACE TEMP
  PROFILE DEFAULT
  ACCOUNT UNLOCK;

-- 2 Roles for DEVELOPER 
GRANT CONNECT TO DEVELOPER CONTAINER=ALL;
GRANT RESOURCE TO DEVELOPER CONTAINER=ALL;
ALTER USER DEVELOPER DEFAULT ROLE NONE;

-- 3 System Privileges for DEVELOPER 
GRANT CREATE SESSION TO DEVELOPER;
GRANT CREATE TABLE TO DEVELOPER;
GRANT CREATE TRIGGER TO DEVELOPER;

-- 2 Tablespace Quotas for DEVELOPER 
ALTER USER DEVELOPER QUOTA UNLIMITED ON SYSAUX;
ALTER USER DEVELOPER QUOTA UNLIMITED ON USERS;

0 个答案:

没有答案