- 论坛徽章:
- 0
|
我现在建一个事件触发器,开始用我自己的用户,老给我报错为:
CREATE OR REPLACE TRIGGER log_info
*
ERROR 位于第 1 行:
ORA-06552: PL/SQL: Compilation unit analysis terminated
ORA-06553: PLS-320: the declaration of the type of this expression is
incomplete or malformed
然后我以为是我设的权限太小,就用sys用户,sys用户也只是第一次建成功了,一旦我删了,再重建就给我报错:
CREATE OR REPLACE TRIGGER log_info
*
ERROR 位于第 1 行:
ORA-06552: PL/SQL: Compilation unit analysis terminated
ORA-06553: PLS-320: the declaration of the type of this expression is
incomplete or malformed
我不知道错误出在哪?我的触发器为:
CREATE OR REPLACE TRIGGER log_info
after logon on database
declare
user_name varchar2(10);
user_ip varchar2(16);
begin
select sys.login_user into user_name from dual;
select sys_context('USERENV','IP_ADDRESS') INTO user_ip FROM dual;
insert into log_info values(user_name,user_ip, sysdate);
end;
所建的表为:
user_name varchar2(20)
user_ip varchar2(20)
date dat
谁知道,说说 |
|