Can't create trigger. help me! [message #371360] |
Fri, 06 October 2000 10:13 |
ChangHyun Bang
Messages: 5 Registered: October 2000
|
Junior Member |
|
|
I can't create trigger.
I run SQL owner is "sys" user.
CREATE TRIGGER "SYS"."LOGIN_ACC" INSTEAD OF INSERT
ON "DBA_AUDIT_SESSION"
BEGIN
INSERT INTO login_info (username, accountname, login_date)
VALUES ('oracle','kmn-id', TRUNC(SYSDATE));
END;
CREATE TRIGGER "SYS"."LOGIN_ACC" INSTEAD OF INSERT ON "DBA_AUDIT_SESSION" BEGIN
*
ERROR at line 1:
ORA-04089: cannot create triggers on objects owned by SYS
- winchild -
|
|
|
Re: Can't create trigger. help me! [message #371361 is a reply to message #371360] |
Fri, 06 October 2000 10:17 |
LB
Messages: 13 Registered: September 2000
|
Junior Member |
|
|
Try the following:
CREATE OR REPLACE TRIGGER LOGIN_ACC
AFTER INSERT ON DBA_AUDIT_SESSION
rest of code
You don't need the quotes or a qualifier in front of the trigger name
|
|
|
Re: Other method, but continue error! [message #371362 is a reply to message #371361] |
Fri, 06 October 2000 11:02 |
ChangHyun Bang
Messages: 5 Registered: October 2000
|
Junior Member |
|
|
CREATE TRIGGER login_acc
BEFORE
INSERT
ON dba_audit_session
BEGIN
INSERT INTO login_info (username, accountname, login_date)
VALUES ('oracle','kmn-id', TRUNC(SYSDATE));
END;
CREATE TRIGGER login_acc
*
ERROR at line 1:
ORA-25001: cannot create this trigger type on views
- winchild -
|
|
|
Re: I following to you, but... [message #371363 is a reply to message #371361] |
Fri, 06 October 2000 11:07 |
ChangHyun Bang
Messages: 5 Registered: October 2000
|
Junior Member |
|
|
CREATE OR REPLACE TRIGGER LOGIN_ACC
AFTER INSERT ON DBA_AUDIT_SESSION
BEGIN INSERT INTO login_info values ('oracle','kmn-id',TRUNC(SYSDATE));
END;
/
CREATE OR REPLACE TRIGGER LOGIN_ACC
*
ERROR at line 1:
ORA-25001: cannot create this trigger type on views
- winchild -
|
|
|
Re: Trigger to TABLE, but can't create. [message #371364 is a reply to message #371360] |
Fri, 06 October 2000 11:33 |
ChangHyun Bang
Messages: 5 Registered: October 2000
|
Junior Member |
|
|
CREATE OR REPLACE TRIGGER login_acc
AFTER INSERT ON aud$
BEGIN
INSERT INTO login_info (username, accountname, login_date)
VALUES ('oracle','kmn-id', TRUNC(SYSDATE));
END;
CREATE OR REPLACE TRIGGER login_acc
*
ERROR at line 1:
ORA-04089: cannot create triggers on objects owned by SYS
Why can't trigger on sys object?
Thank's
- winchild -
|
|
|