Re: Trigger Length
Date: 1996/04/16
Message-ID: <4l0sdo$26e_at_ams.amsinc.com>#1/1
In article <317306EE.1264_at_frontiernet.net>, ekammin_at_frontiernet.net
says...
>
>Does anyone know the maximum length of a trigger? I'm having trouble
>with a trigger, and I think the body has exceeded the maximum allowable
>size.
From my understanding, you want to keep triggers short. In current versions of Oracle7, triggers have to be parsed/compiled/whatever for every user, or something like that. This may change in the future, I believe, but triggers were intended to be short. In training, I was told that if a trigger is 200 lines, its too long.
One option that I have used, is to write whatever functionality you can
into stored procedures and/or functions. PL/SQL in procedures and
functions are stored compiled, so it's less work for the server to use
them compared to triggers. That way, the triggers can call the stored
precedures, the same functionality can be preserved, the triggers can be
as small as necessary.
Hope this helps.
Ed