This content has been marked as final. Show 4 replies
You need to look what making this trigger invalid and fix that problem. And make sure you have all the right privs to create this trigger
create or replace trigger DDLTrigger AFTER DDL ON DATABASE BEGIN insert into perfstat.stats$ddl_log ( user_name, ddl_date, ddl_type, object_type, owner, object_name ) VALUES ( ora_login_user, sysdate, ora_sysevent, ora_dict_obj_type, ora_dict_obj_owner, ora_dict_obj_name ); END; Show errors /
The thing i have created this trigger from USER SCOTT and when i perform any DDL Statement it throws this ERROR.
USER SCOTT have been granted all the priviledges by the SYS. But still this problem is there,
What could be the possible ERRORS that makes this trigger INVALID
Create this trigger from system account and try it again
Do you have privs on scott to insert data owned by perfstat (seems you created a statspack user)
insert into perfstat.stats$ddl_log
i might have miscoded this trigger.Below is what i m looking for
1) Create this trigger using USER SCOTT
2) Whenever any DDL happens in SCHEMA SCOTT this trigger should be FIRED and stores the INFO in Table SCOTT_DDL which should be created in the SCHEMA SCOTT.
I have created this table "SCOTT_DDL" in SCHEMA SCOTT. Can u tell me what all changes do i need to make in the trigger code
Thanks in advance