Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: guideline for creating temporary (working) table

Re: guideline for creating temporary (working) table

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Sun, 01 Feb 2004 11:28:14 -0800
Message-ID: <1075663639.53789@yasure>


Ed Avis wrote:
> rgaffuri_at_cox.net (Ryan Gaffuri) writes:
>
>

>>Reason for not having truncate in production is because you might
>>truncate the wrong table.

>
>
> This doesn't make any sense. If you have delete permission on a
> table, then it is equally easy to 'delete from wrong_table'. To
> protect against such mistakes you'd have to deny permission for both
> delete and truncate. There may be good reasons to grant one and not
> the other, but avoiding such mistakes is not one of them.

While I agree with your statement in general there is a far greater danger with truncate than with delete.

As DJ states a rollback is possible from a delete but not with a truncate. But in addition, and perhaps more importantly, I can flashback from a delete after commit but can not with a truncate until 10g.

Missing from all of this, however, is that no one should ever be allowed to perform an unrestricted delete or a truncation in a production database. If the design allows either of these actions the design is bad by definition.

Murphy's law has not been repealed.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Sun Feb 01 2004 - 13:28:14 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US