clicksor ad

Monday, October 16, 2006

ORA-04093:REFERENCES TO COLUMNS OF TYPE LONG ARE NOT ALLOWED IN TRIGGERS

SQL>create table test(data1 varchar2(10),data2 long raw,
data3 varchar2(99));
SQL>create or replace trigger t1
after Insert or update or delete on test
for each row
declare
begin
null;
end;
SQL>Alter trigger t1 compile debug;
SQL>Show error
# cause: When compiling a trigger in debug mode which refers to a table
containing a LONG RAW column, the compilation will fail with two ORA-4093 "
references to columns of type LONG are not allowed in triggers" errors,
despite the fact that the trigger does not refer to the LONG RAW column in any
way.

Reference:
Bug 2545620 Trigger Compilation With Debug Option Leads to ORA-04093


fix:

This is fixed in Oracle10i.

Workaround:

1. Don't use LONG RAW columns.

2. Don't refer to any table which contains LONG RAW columns.

3. Don't compile the trigger in debug mode.

4. Move the references to the LONG RAW-containing tables into a stored
procedure. (Then both the procedure and the trigger can be compiled debug.)

5. Try setting event 10933 to level 2048. But the affects of the debugging
action on trigger are not known. Like:

alter session set events = '10933 trace name context level 2048'

No comments: