trying to figure out a truncate trigger issue

From: <TESTAJ3_at_nationwide.com>
Date: Wed, 13 Jan 2010 09:58:18 -0500
Message-ID: <OF5DBF4E6C.5BC249A8-ON852576AA.0052027F-852576AA.00523DC3_at_lnotes-gw.ent.nwie.net>



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
(to_date('01-jan-2000','dd-mon-yyyy')),

partition part_2000 values less than
(to_date('01-jan-2001','dd-mon-yyyy'))

);

create or replace trigger x1_test_trig
before truncate on schema

begin
  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

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jan 13 2010 - 08:58:18 CST

Original text of this message