trying to figure out a truncate trigger issue

From: <>
Date: Wed, 13 Jan 2010 09:58:18 -0500
Message-ID: <>

I need to be able to run a "alter table truncate partition" but NOT a truncate table.

I can't seem to figure out how to separate those 2 commands, it appears to a schema level trigger for truncate as they are the same.

test code below:

thanks, joe

drop table x1_test;

create table x1_test
( z date)

partition by range (z)
(partition part_1999 values less than

partition part_2000 values less than


create or replace trigger x1_test_trig
before truncate on schema

  raise_application_error('-20001','No truncate allowed'); end;

alter table x1_test truncate partition part_1999;

Joe Testa, Oracle Certified Professional Senior Engineering & Administration Lead
(Work) 614-677-1668
(Cell) 614-312-6715

Interested in helping out your marriage? Ask me about "Weekend to Remember"
Feb 12-Feb 14, 2010, Valentine's Day Weekend in Akron, OH

Received on Wed Jan 13 2010 - 08:58:18 CST

Original text of this message