creating procedure for audit table
Posted in 2003
Hi All,
I'm running informix 9.30UC4W3 on Solaris 7/8.
I need your help as i'm new for informix to create a procedure.
This procedure purpose to audit a specific table if this table hit by
someone (UPDATE) and another procudure to denied any UPDATE on the
table.
I have created but not working.
Could someone pls to help me to create a working procedure to LOG
every update and to DENIED any update to specific table.
BRGDS
ABDOELL
my procedure...
create table .audit_table
(
login char(16) not null ,
atime datetime year to minute not null ,
table char(20) not null ,
type char(20) not null ,
change char(300) not null
);
and create triggers and procedures for each table that I need an audit
trail for.
create table intrud
(
a integer,
b char(8)
);
revoke all on intrud from "public";
create trigger update_intrud insert on inrud referencing
new as post_upd
for each row
(
execute procedure audit_table(post_upd.a ,post_upd.b
));
CREATE PROCEDURE audit_table(a int, b char(8))define change char(80);
insert into audit_table values (user, current, "intrud", "INSERT",change);
END PROCEDURE;
let change = a || "," || b;