我用下面的SQL创建了扳机的Oracle SQL,触发上表中不同的方案
CREATE OR REPLACE TRIGGER INSERT_LOG
AFTER INSERT
ON EXTERNAL_SCHEME.PAYMENT
FOR EACH ROW
BEGIN
INSERT INTO MY_SCHEMA.DM_LOGGER(ID, TECHNOLOGY, WORKFLOW, NAME_EVENT, TIME_EVENT)
VALUES (PAYMENT.id, 'Repository', 'UP', (select repo.name from
pay_repository repo join pay_pmt pay on repo.id = pay_pmt.repository_id
where repo.id = pay.repository_id),(select to_char(SYSDATE, 'hh24:mi:ss') from dual));
END;
当我执行这触发我得到以下异常:
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to change the current username or password
without the appropriate privilege. This error also occurs if
attempting to install a database without the necessary operating
system privileges.
When Trusted Oracle is configure in DBMS MAC, this error may occur
if the user was granted the necessary privilege at a higher label
than the current login.
*Action: Ask the database administrator to perform the operation or grant
the required privileges.
For Trusted Oracle users getting this error although granted the
the appropriate privilege at a higher label, ask the database
administrator to regrant the privilege at the appropriate label
我不明白这一点。我与这两种方案都有联系,我从不想改变某些东西。哪里不对?
这只是试图执行触发器的用户没有权限这样做。 –