ORA-04071:缺失BEFORE,AFTER或INSTED OF关键字
--add/alter/dropCREATETABLEevent_ddl(eventVARCHAR2(40),usernameVARCHAR2(40),ownerVARC...
--add/alter/drop
CREATE TABLE event_ddl(
event VARCHAR2(40),
username VARCHAR2(40),
owner VARCHAR2(40),
objname VARCHAR2(40),
objtype VARCHAR2(30),
TIME DATE
)
CREATE OR REPLACE TRIGGER tr_ddl
ALTER DDL
ON yqj.schema--其中yqj为我的表空间和登陆账号密码
BEGIN
INSERT INTO event_ddl VALUES(
ora_sysevent,
ora_login_user,
ora_dict_obj_owner,
ora_dict_obj_name,
ora_dict_obj_type,
SYSDATE
);
END;
/ 展开
CREATE TABLE event_ddl(
event VARCHAR2(40),
username VARCHAR2(40),
owner VARCHAR2(40),
objname VARCHAR2(40),
objtype VARCHAR2(30),
TIME DATE
)
CREATE OR REPLACE TRIGGER tr_ddl
ALTER DDL
ON yqj.schema--其中yqj为我的表空间和登陆账号密码
BEGIN
INSERT INTO event_ddl VALUES(
ora_sysevent,
ora_login_user,
ora_dict_obj_owner,
ora_dict_obj_name,
ora_dict_obj_type,
SYSDATE
);
END;
/ 展开
展开全部
这样试试:
CREATE OR REPLACE TRIGGER tr_ddl
before ALTER DDL -- 此处可能不需要ddl
ON yqj.schema--其中yqj为我的表空间和登陆账号密码
BEGIN
INSERT INTO event_ddl VALUES(
ora_sysevent,
ora_login_user,
ora_dict_obj_owner,
ora_dict_obj_name,
ora_dict_obj_type,
SYSDATE
);
END;
CREATE OR REPLACE TRIGGER tr_ddl
before ALTER DDL -- 此处可能不需要ddl
ON yqj.schema--其中yqj为我的表空间和登陆账号密码
BEGIN
INSERT INTO event_ddl VALUES(
ora_sysevent,
ora_login_user,
ora_dict_obj_owner,
ora_dict_obj_name,
ora_dict_obj_type,
SYSDATE
);
END;
追问
提示缺少关键字ON
追答
把ddl去掉试试
before ALTER
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询