Попросили сделать. Накидал на коленке, может, кому-то еще надо:
Код:
DROP TABLE "SUPERMAG"."OK_SMLABELLOG";
CREATE TABLE "SUPERMAG"."OK_SMLABELLOG"
("EVENTTIME" DATE DEFAULT SYSDATE NOT NULL ENABLE,
"DOCTYPE" CHAR(2),
"DOCID" VARCHAR2(50),
"PARAMNAME" VARCHAR2(100),
"OLDVALUE" VARCHAR2(100),
"NEWVALUE" VARCHAR2(100),
"USERNAME" VARCHAR2(100) NOT NULL ENABLE) COMPRESS;
CREATE BITMAP INDEX OK_SMLABELLOG_DT on "SUPERMAG"."OK_SMLABELLOG"(DOCTYPE);
CREATE BITMAP INDEX OK_SMLABELLOG_EMP on "SUPERMAG"."OK_SMLABELLOG"(USERNAME);
CREATE INDEX OK_SMLABELLOG_ID on "SUPERMAG"."OK_SMLABELLOG"(DOCID);
CREATE OR REPLACE TRIGGER "SUPERMAG"."OK_SMLABELLOGGING" after insert or update or delete
on supermag.smdocprops
for each row
declare
pragma autonomous_transaction;
begin
insert into supermag.ok_smlabellog (doctype,docid,paramname,oldvalue,newvalue,username) values (:new.doctype,:new.docid,:new.paramname,:old.paramvalue,:new.paramvalue,USER);
commit;
end;
select * from "SUPERMAG"."OK_SMLABELLOG";
под Standart, соответственно, компрессию и битмапы надо убрать.