There are triggers like the one below in a database I have. I am building scripts to recreate these objects in another database for the user "LEADS". I have set the ddl in a sql script but I get the errror ...
CREATE OR REPLACE TRIGGER LEADS.tub_user_role_type
*
ERROR at line 1:
ORA-04089: cannot create triggers on objects owned by SYS
If this is the same ddl then why can't I create this object in my second database. I am running this from the SYS account.
--
-- TUB_USER_ROLE_TYPE (Trigger)
--
-- Dependencies:
-- DUAL (Table)
-- DUAL (Synonym)
-- STANDARD (Package)
-- USER_ROLE_TYPE (Table)
-- DUAL ()
--
CREATE OR REPLACE TRIGGER LEADS.tub_user_role_type
BEFORE
UPDATE
ON user_role_type
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
SELECT USER, SYSDATE
INTO :NEW.update_id, :NEW.update_date
FROM DUAL;
END;
/
SHOW ERRORS;
Regards
Eric
--
Search for products and services at:
http://search.mail.com
Oracle LazyDBA home page