Typical scenarios in which the delete administrative object trigger might be used include:
Check TriggerThe check trigger is executed before the normal administrative object deletion code. You can use the check program:
To enable the delete administrative object check trigger, you must add a program in the database named DeleteAdminCheck. DeleteAdminCheck ExampleThe following is an example of how to use the DeleteAdminCheck program to block all administrative object deletion processes: add prog DeleteAdminCheck code 'tcl; eval { puts "block admin object delete event" exit 1 }'; Action TriggerThe action trigger executes after the delete event transaction is completed. You can use the action program:
To enable the delete administrative object action trigger, you must add a program in the database named DeleteAdminAction. DeleteAdminAction ExampleThe following is an example of how to use the DeleteAdminAction program to dump administrative object information to a file: add prog DeleteAdminAction code 'tcl; eval { set output [open c:/tmp/my.log w] puts $output "${USER},${EVENT},${INVOCATION},${ADMINTYPE},${ADMINNAME}" close $output }'; |